We are using Retool via Cloud. I have 2 environments: production and staging. I have 2 workflows: parentWorkflow is executed via webhook or manual trigger, and manually triggers a second workflow childWorkflow. When parentWorkflow kicks off childWorkflow, I want to be able to specify the environment that childWorkflow will run in.
Two use cases:
- I use workflows to test other workflows. For instance, I’ll have a CSV of scenarios that the test workflow will load up, and then it’ll run the “workflow under test” using each scenario. I want to be able to do this using production data and staging data.
- When Salesforce makes call to Retool workflow webhook, it can either come from our production instance or our staging instance. I know that I can set environment in the url (eg
?environment=productionand that does work. However, when a staging instance of Salesforce are made, it copies the production url into staging. So we have to manually clean that up every time.
I have tried specifying ”environment”: “staging” in the raw parameters when calling the workflow, and it didn’t work.
What I did not try, and maybe I will now – create a new “REST API” resource that sends request to childWorkflow webhook url, and specify the environment there. I guess in theory that should work. Haven’t tried it though.