Secondary environment build

Hello there. I would like to make possible lunch build triggers for not primary environment for content managers. I would like that can enter name of environment on attached screenshot


and this variable will be written to field “Specify the JSON payload to send with the request” in the builder trigger configuration.

Hi @maksym,

Welcome to the forums!

You should be able to set this up using our Roles & Permissions system: Project collaborators, roles and permissions — General concepts — DatoCMS

For example, you can make a role that is allowed to run only a specific build trigger, but denying them the primary one:

Does that help?

Hi Rogerm


I thought to have some input here where you can enter name of environment or have a button to build current environment, so in my action I can receive the name of it.

Hey @maksym,

When you create build triggers, you can choose “Custom webhook” to send whatever you want:

And you can give it a custom name plus body content:

So you can have one trigger for prod, another for staging, etc., and each one can send a completely different body and/or point to a different destination for triggering different build scripts.

Is that what you’re asking for, or am I still misunderstanding?

Not really. For example one of content managers is creating a new environment with some custom name forked from primary. They want to build this new environment to Stage without changing primary environment. I didn’t found any easy way to do it. As you proposed I can create new build trigger with predefined name and content managers need to create a new environment with same name. This is not really convenient.

Ah, I see now, thank you for explaining! You want editors to be able to input a name on their own when they click the build button, not have it be pre-configured when the trigger is first made.

Let’s leave this feature request here as-is with this clarification. Thank you again for explaining :slight_smile:

FYI, sometimes feature requests can take a while to be implemented, and that’s only if they get enough votes. If this is a time-sensitive need, you might consider using (or modifying) a similar plugin instead, such as:

You should be able to fork those plugins (they’re open source) to have them automatically detect the current environment and send a build/preview hook to Staging.

Thank you. Input field or “build current environment” what sends a name of current environment to build trigger