Specify which environment to run from a client by webhook

I have a workflow that is activated through a webhook and I need to specify from a client which environment I want it to run, test, prod or staging.
This is possible? maybe some parameter in the url?

Maybe a different endpoint?

Hey @zeroray! Hmm, I think the best way to do this would be to have different Workflows (one for each environment) and then just you can just trigger the Workflow you want.

How would you ideally like to pass in the environment?

I see some ways, for example, when the user changes the environment.


Each environment has its own endpoint, so manage these endpoints from the client.

Another option is to use query parameters, https://....../id-workflow?environment=production|testing|staging

Another option is to use headers.

Currently the running environment is that I leave it set before exiting workflows which is very error prone.

Got it, thank you for clarifying! I'll add this to the ticket and keep you updated :+1:

In the meantime, the best workaround would definitely be to create separate Workflows (to each hit production vs staging vs testing data) and trigger each one depending on which environment you want.

1 Like