Someone has set up a Chain and it runs successfully. They want to receive an email notification of this outcome, but only on a certain day of the week. This person should configure a Conditional Chain Event in their Chain.

Sample Chain

The following Chain represents a series of generic Commands that execute. A Conditional Chain Event can be added anywhere in the Chain to check the day of the week. Here, it's been added after the second Command and titled "Check day of Week". If the day matches, then perform an additional action actions such as send an email notification. The following Command is "Send Notification" and we see that the person wants to receive a notification on Wednesday, if the Chain was successful.

Continue past the image below to see how to configure a Conditional Chain Event.

Command Configuration - Conditional Chain Event - Part 1

Configure the Command with the following:

  • Select String as the test data type

  • Add the Chain.ExecutionDateTime System Variable

  • Type in the day of the week to compare to

Command Configuration - Conditional Chain Event - Part 2

  • Next, use Variable Transformation to transform the Chain.ExecutionDateTime System Variable to a day of the week.

  • Depending on your requirements, set the transformation and use the following as an example.

    📓 The %A converts the current date and time to a day of the week. For a comprehensive description of the format specifier, please refer to this strftime format guide.

Send Notification

Add a placeholder Command such as List Directory to send a notification. Be sure to set the Link Condition to Success.

As always, we welcome questions on this post, feel free to contact us at support@onecloud.io.

Did this answer your question?