Jan 20, 2022 05:38 AM
I have an automation that emails the count of records that match certain criteria.
This often results in emails that indicate there are 0 records for consideration.
I’d like to only fire this automation (or send the email) if there matched records are >0.
Is this possible using the new conditional automations, or via scripting?
Thanks,
Andy.
Solved! Go to Solution.
Jan 20, 2022 06:50 AM
You’re probably using a “find” action to return the number of records? You can put the “email action” in the “conditional actions” and configure to only send when the amount of found records is > 0.
Do keep in mind that every trigger (so not the actions) count towards your automation run limits.
Jan 20, 2022 06:50 AM
You’re probably using a “find” action to return the number of records? You can put the “email action” in the “conditional actions” and configure to only send when the amount of found records is > 0.
Do keep in mind that every trigger (so not the actions) count towards your automation run limits.
Jan 21, 2022 12:45 AM
Thank you. That’s exactly what I was looking for.
Jan 21, 2022 03:24 PM
Would the automation not just fail if “find” found zero results? I’m having a heckuva time with cases where “find” is passed an empty field or when it finds zero results. In both cases, it appears to halt the automation (and email me every time to let me know) rather than proceed to an alternative “find” method. I read the documentation for “find” and found little help around its failure conditions.
Jan 22, 2022 10:55 AM
No. The “find record” actions never fails. It’s the action after that that fails. That’s why you can put “find records” in the action box, but the other actions in the conditional action box (with condition “where find records length > 0”) + 1 more “otherwise” action (eg, “send email”).
That way, when records are found, your action will run. If no records are found, you’ll get an e-mail.
Dec 22, 2022 11:34 PM
@Databaser this is incorrect. If you put "Find Records" in the Action, it will always run but if it doesn't find anything, the subsequent steps (conditional or not) won't run. The automation will fail and will send an email to the user stating that it failed to run.
As far as I know, I couldn't find ANY way around this besides creating two separate automations:
Dec 23, 2022 02:22 AM
@Databaser this is incorrect. If you put "Find Records" in the Action, it will always run but if it doesn't find anything, the subsequent steps (conditional or not) won't run. The automation will fail and will send an email to the user stating that it failed to run.
Isn't this exactly what I said?
Mar 02, 2023 10:39 PM