Help

Don't Run Automation if Records Don't Exist?

Topic Labels: Automations
Solved
Jump to Solution
3516 7
cancel
Showing results for 
Search instead for 
Did you mean: 
andy_democracy
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

1 Solution

Accepted Solutions
Databaser
12 - Earth
12 - Earth

Hi @andy_democracy

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.

image

Do keep in mind that every trigger (so not the actions) count towards your automation run limits.

See Solution in Thread

7 Replies 7
Databaser
12 - Earth
12 - Earth

Hi @andy_democracy

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.

image

Do keep in mind that every trigger (so not the actions) count towards your automation run limits.

andy_democracy
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you. That’s exactly what I was looking for.

Attaboy
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

Selman_Kaldirog
4 - Data Explorer
4 - Data Explorer

@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:

  1. One with the Find record as action and continue as is (IF FOUND)
  2. One that checks for a condition (not based on find record but typically from the first automation's output to find the case of "IF NOT FOUND") and then continues. 

@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?