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?
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.
Thank you. That’s exactly what I was looking for.
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.
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.