Troubleshooting an email send via automation

I have set up a myriad of those automations and all work well. Now I got one, that just doesn’t want to, meanwhile it’s the simplest of tables and automations and it’s all set up just as always but doesn’t want to work.

Can you please help me figure this out:

For some weird reason it just adds my name (a different field) into the “TO” field instead of the email field as specified in the automation.

Bildschirmfoto 2023-10-16 um 09.54.59

Here the setup for the automation

Bildschirmfoto 2023-10-16 um 09.55.09

To show you that there is indeed an email address in that field:

Bildschirmfoto 2023-10-16 um 09.55.30

As mentioned before the exact same configuration works in another table splendidly with much more complicated setups. I am lost. Any ideas?

Did you retest the trigger step, and then retest all the action steps after the trigger step?

Perhaps it doesn’t like the text in the field Email since it is a lookup field. Maybe you add another formula field with CONCATENATE function pointing to your Email lookup field. Then have that new field as source field for the automation.
Make sure there is no spaces or anything around the email address. Sometimes there are invisible characters included and that could cause an issue.

It doesn’t even look like it’s pulling in the email lookup field, because according to the screenshot, it shows that it is trying to send email to a full name “Bettina Horvath” instead of an email address.

I have tried that, same result. even if I use a simple text field and type it in. It’s pulling the wrong field info in general

Yup, that’s the problem! And I can’t figure out why. The setup is exactly the same as the others that work just fine.

It’s as if in the automation the to-field is populated by the field named “wen erinnern” which is the linked field, it takes that info from that field and tries to send the email there, meanwhile the field it should pull the data from is the “email (from wen erinnern)” field as entered correctly.
As mentioned above, I have tried to use a formula field as well as a single text field, nothing works. It just doesn’t do it correctly.


So I’ve just done some more testing and I think I found the culprit - it lies in the trigger which is time based and that is often messed up. In the other automations the trigger is mostly a checkmark or status change or something but here I have a time based trigger.

In testing I added a new record and it ran correctly (day to send and TODAY() is the same). But when I try the automation with the other record that is already in the past it creates that error. Unfortunately it doesn’t show where the error actually is - in the condition! It says success for the condition, meanwhile that is factually not correct. The condition states that trigger is when TODAY() equals datefield. And that obvsiously isn’t the case.

I know that timezones and when automations run and when today is today etc etc is all a bit wonky and to me not quite clear in airtable. Or rather too much work to figure out now.

So the learning is:

Beware of timed triggers that compare dates, rather use other mechanisms to trigger the send (as in a formula that gives a status or such).

While typing this it tried to run it again and failed, so actually the problem still persists and is deeper than simply a mismatch of dates. I’ll definitely switch it to a different trigger and hope it will work then.

One of the weaknesses of the automation is inability to control the timing of the flow - a delay step. When Airtable runs the step, the data isn’t ready yet because something else is updating etc. I find sometimes adding additional steps or moving priority around the steps or as you described (if I understand correctly) using a different trigger solves the issues - usually - but still this is costly to do. Maybe having a delay step in the automation would solve similar issues. The delay step is on the wish list so hopefully Airtable reads this blog from time to time.

You can introduce a delay in an automation using a scripting automation. It is a very simple script that has been posted several times in various places. (If you don’t want to hunt it down, you can also purchase a version with my automation helpers scripts.)

One issue is that introducing a delay will not give you updated record values. If you want new values that were changed during the delay, you need to do a fresh read of the record (typically with a find records action). If you get the record values from the “step 1” trigger, you will have the field values at the time that the trigger fired, not the value after the delay.

Wow, I did not know this. This is very unfortunate. I just tested this, and you are correct! So there is absolutely no point in adding delays to automations — they do nothing at all!

Ugh!

Well, there are other reasons for adding a delay to an automation. For example, you might call another service and want a delay to let that service do its thing. Or you might want to wait for another automation to finish. Or you might want to wait for an attachment to fully upload before doing something. And the trick of doing a fresh read of the record works well.

But yeah, I rarely use delays in Airtabor automation.

Airtabor! That typo made me chuckle! :sweat_smile:

It is not an issue with missing data that is helped by a delay. It misinterprets the first step as success and then the second cant work because it doesn’t have the info it needs. But it shouldn’t even get to that step.

I have tried the delay on several other automations as I read about it here, but it doesn’t work either on those. I added the find records step to an automation a couple of times to get around that lag but it makes no difference, so I stopped doing that too and find another way to get it done. Usually involves some new fields and formulas and separate automations. A pain because in my one major base I am getting to the limit for automations. Will have to rethink the entire base soon in terms of automation. It’s grown over the last year in bits and needs some love and care :wink:

If you’ve already tried re-testing your trigger step and re-testing all of your action steps (which usually solves these sorts of problems), I would just delete the automation and recreate it from scratch.

I would also try to replicate a simple scenario with a simple table outside of your current project to see if the issue is general limitation or if there could be other stuff at play like the base complexity which causes strain in the process between the steps.