I currently have an automation that will send an email to Slack Channel #1 (TEST) if the issue's (custom field) TestFlag is set to ON and send an email to Slack Channel #2 (LIVE) if the issue's (custom field) TestFlag is set to OFF. This works fine and enables me to test my automation via my Slack TEST channel. However, it requires me to test the (custom field) TestFlag and create identical email messages that only differ by the "TO" field, which contains the appropriate Slack channel email address.
I'd like to be able to test (custom field) TestFlag and set a smart variable, or a field inside the issue with the email address of the appropriate Slack Channel, use a single email message, and send that email by specifying the "TO" field with the smart variable or the field inside the issue (whichever works, I don't need both).
Is there a way to do this in Jira Cloud?