Same webhook URL across environments – which workflow receives the request?

Hi! I’m trying to understand how Retool handles webhooks across environments.

I have the same workflow deployed in multiple environments (for example: development, staging, and production). The workflow is triggered via a webhook URL.

My concern is the following:

If the workflows across environments share the same webhook URL, which workflow actually receives the incoming API request?

For example:

  • I have 4 versions of the same workflow (one per environment).

  • An external system sends a request to the webhook URL.

Question:
How does Retool decide which environment’s workflow is executed?
Is it based on the environment the workflow was deployed to, or could requests be routed to the wrong environment?

Ideally I’d like to:

  • Keep separate webhook URLs per environment, or

  • Ensure that development/staging traffic never triggers the production workflow.

What is the recommended way to handle this in Retool?

Hi @Florencia_Barreto ,
Welcome to the Retool community!

Each workflow can have a webhook where you specify the default environment:

You can also specify the environment in the query parameters, https://....../id-workflow?environment=production. You can find more details in a previous thread here.

I hope this helps!

2 Likes

Hey @Florencia_Barreto welcome to the Community, glad you found us! :+1:
@Shawn_Optipath, you beat me to it, thanks a lot for always providing such thoughtful responses! @Florencia_Barreto, how are you doing? Do you still need more help? Let me know!

1 Like