Wednesday
Hello!
I have a Salesforce background, and one of the abilities that Salesforce provides is being able to know if you're working in a Sandbox (testing environment) or in Production. This is helpful because I would create automation that checked what environment type the automation was running. One automation in particular sent notifications to Slack. If running in a Sandbox, then the notifications were sent to test channels; otherwise, the notifications would be sent to the correct business channel. This was helpful to keep testing in a non-distracting channel for the rest of the business.
I am wondering if there is a similar ability within a recipe. I am sending slack notifications again, and I'd like to dynamically send them to testing channels or business channels without skipping tasks if I'm in production or my dev environment.
Thank you for your help in advance!
Thursday
Hi @kevinNel,
I think you might have to use Lookup table or Environment Properties.
Regards,
Prudvi
Thursday
We've done this sort of thing based on the User Name in the recipe properties. Our user name in our shared workspace is workato-dev, workato-test, and workato (for prod), so we check if the username has dev, test, or prod. I *THINK* the environment name might be in there too, but I'd at least start with the recipe properties. I know we didn't build anything custom for it.
You'll also see an "is test" flag in the recipe properties... that's not a reference to the environment, rather a reference to if you're running the recipe in Test mode or not.
Thursday
Workato offers multiple dev environments, so you can develop recipes in a lower environment and release to production or other interim environments. I think whether you have access depends on your subscription/contract. It might only be available for embedded customers. That said, this is probably a bigger solution than you need.
On a smaller scale, you can create your recipes to determine the environment and behave accordingly. How to do this is up to you, but here's a simple method:
We use this method regularly for the exact reason you described. If environment == production, email the real contacts, if environment == sandbox, email internal addresses.
On a side note, our trigger recipes rarely do all of the processing. They almost always call a separate function recipe, or route the incoming trigger to the appropriate recipe. This helps tremendously with troubleshooting, re-running, and keeping your processing recipes specific, modular, and not monolithic monsters.
Hope this helps!