This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hey Community. I am trying to send out emails that notify certain people when a piece of equipment gets an error code labeled "critical" but I'm getting stuck. I want to use more than just the filter tool because I don't want to be emailing out blank email attachments. What I have right now is a report that shows only the critical error codes and the event I scheduled will send that report. However, if there are no critical error codes, the report still gets emailed out but is blank. I need the workflow to run every 5 minutes so the recipient receives the notification almost instantly from the time the equipment logged the critical condition. What I don't want to happen is an email being generated every 5 minutes when the report is blank.
I've done some research and I think I need to use the Detour tool, but I am extremely unfamiliar with all of the interface tools and the developer tools and I'm hoping someone either has a different solution than those tools or can help me understand those tools and possibly apply the Detour tool to this workflow.
A possible solution would be to only send the email on a successful run of a workflow and triggering an error if there are no critical codes. Use the Count Records tool followed by the Message tool with the following configuration
The configure the workflow to cancel running if an error occurs - this can be done within Runtime setting of the workflow
I've seen this solution proposed across multiple threads, but it is not robust.
For example - if you have a workflow that could send 2 separate emails, if you conditionally throw an error to keep email 1 from sending, then email 2 won't send b/c the email tool won't send emails when there are errors in the workflow.
So, how can you solve for this problem?
I have two distinct email tools in my workflow (email A and email B). I ALWAYS need email A to send, I only need email B to send if a certain condition (e.g. record count). Because I ALWAYS need email A to send, I can't conditionally throw an error to prevent B from sending.