Apr 04, 2021 09:06 AM
I am setting up an automated email and want it to go to the email (will be multiple emails) from a lookup field that has the email address in it. When inserting the Data from the Record and selecting the property that has the emails in it, it gives me options. I can not get any of them to work! The error is that the “To” input is empty.
Sep 07, 2021 09:23 AM
It is difficult to diagnose these issues from afar. Here are some general ideas to help you out.
When testing the automation, make sure that you know exactly which records are going to be used in the test (I usually do this by having a slightly different trigger from the final trigger.)
Always retest your trigger before testing any other actions in the automation, and always test each step in the automation in order every time. This means you must retest the trigger and the find action before testing the email.
Sometimes using ", "
(with a space after the comma) versus ","
(no space) in ARRAYJOIN()
makes a difference. I do not remember off the top of my head if it matters in automation emails.
It sounds like you are trying to get an email from two tables away. You need a slightly different technique. The previous methods were for rolling up email addresses only one table away.
When rolling up information two tables away there are two options: rolling up a rollup, or rolling up a lookup. When rolling up the lookup, use ARRAYFLATTEN(values)
as your innermost function.
Lookup fields are the most difficult fields to work with. I avoid them when possible. However, when rolling up information from two tables away, it is sometimes necessary to use a lookup field in the middle table.
Sep 07, 2021 10:43 AM
My solution is complicated because there’s 4 tables involved and so the potential recipient’s email ends up in 2 different fields in the final table that the email automation is referencing, but the short version is that Rollups worked for populating the emails and I then concatenated the two fields into one using a formula. I think I was getting the initial error because AT was choosing a record to test that had no email due to 2 different tables acting as sources for the 4th table.
Your recommendation to retest all triggers was part of the solution as well I believe.
Thanks for the help @kuovonne!