Automation to stop if no records found

This is probably very basic for some of you but I’m new to this …

I can’t figure it out.
I have an automation that sends me an email of today’s tasks every day 7am.
But if there are no tasks, I still get the email, but its an error, as below.

Subject: Something went wrong with an automation: Send a daily digest - Airtable

Any way to NOT send email if the task list is empty?
I have tried conditional actions, (but the only conditions allowed relate back to the trigger - which is time based).

Thanks

I think it’s actually not that straightforward. Your trigger is going to fire no matter what, every day at 7am. In order to then check whether the list of tasks is empty (and hence not send that email), you have to use a script. In that script, you define an output (Airtable Scripting) and depending on that output (for instance “1” for there are tasks) you send the email.

Maybe someone else has an easier solution, but that’s how I would do it and that way you shouldn’t get an error, but I would also need to test it out.

1 Like

Uggh, it seems like such a basic thing. IF record is empty THEN abort, OTHERWISE run actions.
That’s why I tried conditional actions, thinking the logic might work, but the Conditions only relate to the time trigger.
I can’t do scripting so will have to put up with this, or maybe someone has other ideas.

Thanks

You should be able to do this with a conditional action based on the result of the find action. Can you share a screenshot of the configuration and where you are trying to set the condition?

2 Likes

@Rupert_Hoffschmidt

As @Kuovonne_Vorderbrugg said, just do a conditional action of “if length is greater than 0” or “if length is not empty”.

3 Likes

Ah OK, that makes sense, I wasn’t using both Action AND conditional action. So, yes now when I add an action, I can select the result of first action. Am testing now. Thanks

1 Like

Right, I understand, testing now, thank you.

Hi, I’m sorry for hijacking the thread , but I am trying to figure this out as well. There should be no email sent if there are no matching records found.

Is the conditional action in my config the right way to achieve this?
Thanks a million!!

No. The send email action needs to be after the condition. You will need to recreate the send email action in the conditional group and delete it from its current location. You may also need to do the same with your update action.

2 Likes

Will do! Thanks so much! I’ll be back with an update. :slightly_smiling_face:

1 Like

OMG! Thank you so much. It worked! I really appreciate your help. I hope you all have a great day! :slightly_smiling_face:

1 Like

Brilliant, that worked. I was not sure how to construct the conditional action and was trying to do it without a ‘normal’ action first. Thanks for your help.

Thank you as well, your suggestion helps alot.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.