Skip to main content
Solved

Issue with email automation

  • September 24, 2020
  • 5 replies
  • 3 views

Forum|alt.badge.img+4

Hey, I’m trying to add an attachment to my action email in response to a trigger. The attachment is PDF or PNG and is in an Attachment field. But every time I run a test, it gives me test error:

Step failed.
Failed to construct the value for “Attachments”.

How do I get it to read the value? Your help is appreciated.

Best answer by Justin_Barrett

Did you test the trigger step before or after adding attachments to the sample field? Airtable doesn’t automatically refresh the sample data pulled by the trigger step. If you build the trigger step, tested it, and then added the attachments, you would need to re-test the trigger step for it to find and use those items in later actions.

To see exactly what data the trigger step is working with, click the “Test ran successfully” line:

You’ll then see the details of the sample record it found. Click on “Field values” to see the contents of each field from that sample record.

Notice in the example above that there’s no mention of the {Attachments} field in the field values. That’s because I added those two attachments after testing the record, and the test data still contains nothing for that field. I have to re-test the trigger, and then I’ll see that field show up (I won’t see the contents, but the presence of the {Attachments} in the field values list means that it contains data that can be used):

Long story short: when in doubt, check the test data of the trigger/action that you want to use to ensure that the data is actually available.

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

Forum|alt.badge.img+18
  • Inspiring
  • September 24, 2020

Works fine over here when you press ‘Insert’ on the attachment level.


ScottWorld
Forum|alt.badge.img+33
Tuur wrote:

Works fine over here when you press ‘Insert’ on the attachment level.


Nice find, @Tuur!! :slightly_smiling_face:

This dedicated attachments field is a relatively new addition to the outgoing automated emails!! :slightly_smiling_face: Last time I was setting up automated emails for a client (a few weeks ago), the attachment field did NOT exist!

This is huge. :slightly_smiling_face:

@Justin_Barrett @kuovonne


Forum|alt.badge.img+4
  • Participating Frequently
  • September 24, 2020
Tuur wrote:

Works fine over here when you press ‘Insert’ on the attachment level.


I’m inserting but it’s not working. Anyone else able to help?


Justin_Barrett
Forum|alt.badge.img+20

Did you test the trigger step before or after adding attachments to the sample field? Airtable doesn’t automatically refresh the sample data pulled by the trigger step. If you build the trigger step, tested it, and then added the attachments, you would need to re-test the trigger step for it to find and use those items in later actions.

To see exactly what data the trigger step is working with, click the “Test ran successfully” line:

You’ll then see the details of the sample record it found. Click on “Field values” to see the contents of each field from that sample record.

Notice in the example above that there’s no mention of the {Attachments} field in the field values. That’s because I added those two attachments after testing the record, and the test data still contains nothing for that field. I have to re-test the trigger, and then I’ll see that field show up (I won’t see the contents, but the presence of the {Attachments} in the field values list means that it contains data that can be used):

Long story short: when in doubt, check the test data of the trigger/action that you want to use to ensure that the data is actually available.


Forum|alt.badge.img+4
  • Participating Frequently
  • September 24, 2020

Justin! You are a GENIUS. That was it. (all the hours I spent reading and testing to solve this :face_with_head_bandage: ). Thank you


Reply