Help

Re: Display JSON table output from automation script in email

1519 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Zehava_Rubin
4 - Data Explorer
4 - Data Explorer

Hi, 

I am building an automation.

I have a custom script filtering out records that required filters not possible with the built in find records actions.

I set the output to be a JSON object that looks something like this 

 

 

 

[
{
 Record Id: "3197",
 Full Name: "Test, Name ",
 State: ""
},
{
 Record Id: "3198",
 Full Name: "Test, Name2 ",
 State: ""
}
]

 

 

 

 

I want to then insert this info as a grid or table in an email, but the only options that I have are to display each attribute separately as a list such as RecordsIds = ["3197","3198"]

1 Reply 1

Airtable email automations do not support user-defined tables.

A very hacky workaround would be to have a utility table to store the data. The new table would have one for each field of data you want to display, and another identifying field. Have your script create new records in your utility table and set the identifying field to the same unique identifier for all of the records. Output that unique identifier. Then perform a "Find Records" action that finds the records in the utility table based on the unique identifier. Include the results of the "Find Records" action in your email as a grid. Then have another script that deletes the records created by the first script.

Another alternative would be to use a third party email service that supports full html. Your script could then output an html table.