Workflow rule webhook per Zoho CRM environment

Workflow rule webhook per Zoho CRM environment

Currently I have a Workflow rule setup to trigger on the creation of a new Lead in my Zoho CRM account.

Once triggered, with Workflow rule will send a webhook to a specified URL e.g.

https://production.example.com/api/v1/zoho/webhook


If I rebuild my Sandbox environment this Workflow rule is duplicated with the same webhook URL.

This isn't ideal as I want the webhook from the Sandbox environment to go to my test environment (a different URL) e.g.

https://test.example.com/api/v1/zoho/webhook

Is there a way to configure a Workflow rule to dynamically set the URL based on whether it's in the Sandbox environment or not?

The only way I can think to make this work is to send the Organisation ID as a parameter in the webhook which appears to be unique per environment .

Then in the webhook request handler have some logic that checks the Organisation ID and switches relative to which one is sent by the Workflow rule.

Is there a better way to do this?