Skip to main content
Solved

Automation to stop if no records found


Forum|alt.badge.img
  • Participating Frequently
  • 5 replies

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

Best answer by kuovonne

JFP wrote:

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?

View original
Did this topic help you find an answer to your question?

14 replies

Rupert_Hoffsch1
Forum|alt.badge.img+19

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.


Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 5 replies
  • April 11, 2022
Rupert_Hoffsch1 wrote:

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.


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


kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6007 replies
  • Answer
  • April 11, 2022
JFP wrote:

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?


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8856 replies
  • April 11, 2022

@Rupert_Hoffschmidt

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

Alternatively, you can recreate your automations with Make’s advanced automations & integrations.

Make has incredible amounts of error trapping & error control built into their app.

If you’ve never used Make before, I’ve assembled a bunch of Make training resources in this thread.

For example, here is one of the ways that you could instantly trigger a Make automation from Airtable

Hope this helps! If you’d like to hire the best Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld


Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 5 replies
  • April 11, 2022
kuovonne wrote:

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?


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


Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 5 replies
  • April 11, 2022
ScottWorld wrote:

@Rupert_Hoffschmidt

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


Right, I understand, testing now, thank you.


  • New Participant
  • 3 replies
  • April 11, 2022
ScottWorld wrote:

@Rupert_Hoffschmidt

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


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!!


kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6007 replies
  • April 11, 2022
maleeka wrote:

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.


  • New Participant
  • 3 replies
  • April 12, 2022
kuovonne wrote:

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.


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


  • New Participant
  • 3 replies
  • April 13, 2022
kuovonne wrote:

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.


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


Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 5 replies
  • April 25, 2022
kuovonne wrote:

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?


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.


Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 5 replies
  • April 25, 2022
ScottWorld wrote:

@Rupert_Hoffschmidt

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


Thank you as well, your suggestion helps alot.


Forum|alt.badge.img+1
  • New Participant
  • 2 replies
  • January 16, 2025
JFP wrote:

Thank you as well, your suggestion helps alot.


How did you end up configuring this automation?


Jean_Thoensen
Forum|alt.badge.img+11
  • Known Participant
  • 21 replies
  • April 23, 2025

I found that neither length > 0 or length not empty worked. Anyone know why?


Reply