Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Apr 11, 2022 01:10 AM
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
Solved! Go to Solution.
Apr 11, 2022 02:45 AM
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?
Apr 11, 2022 01:45 AM
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.
Apr 11, 2022 01:59 AM
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
Apr 11, 2022 02:45 AM
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?
Apr 11, 2022 03:18 AM
As @K_V said, just do a conditional action of “if length is greater than 0” or “if length is not empty”.
Apr 11, 2022 06:13 AM
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
Apr 11, 2022 06:14 AM
Right, I understand, testing now, thank you.
Apr 11, 2022 01:45 PM
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!!
Apr 11, 2022 03:24 PM
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.
Apr 12, 2022 06:02 AM
Will do! Thanks so much! I’ll be back with an update. :slightly_smiling_face: