Zapier Emails: Create a Table From Linked Records


#1

Hi there!

I am trying to devise a way to send an email with a recap of our sold inventory from the past week using Zapier. The Zap will be triggered upon a new record in a view. (Our sales manager will Audit the list from the past week, then use a checkbox to say it’s ready to go).

Obviously, the number of units sold will change week to week, so I can’t use a static HTML table in my email.

Ultimately, I’d love to end up with the same design I have in Page Designer - see below screenshot. (side note: I will be ecstatic on the day that Page Designer/other blocks integrate with Zapier - it would solve SO MANY of my problems if I could attach a page from Page Designer as a PDF to an email or to a record).

Any ideas as to what sort of action steps I need to use before I build my email template?

Thanks so much!


#2

Not quite the same but, I use a roll-up on my “project” table to pull in all the completed tasks and incomplete tasks into a weekly report email.

Then I use Zapier and their formatting zap to clean up the information and Mailjet to distribute that email as well as create a record in AT for that weekly report.

If you figure out how to send an email with a table, let us know! That would be great for my weekly updates as well!


#3

Thanks Mack! I think I have figured this out after much trial and error - and it’s actually somewhat simple!

I’ve set up a table called [Weekly Emails]. Each record represents one week of units sold and is linked to those units on the table [Sale Details].

On [Sale Details], I added a field called {Table Row} with the following formula (obviously you’d change out your fields to whatever you want to appear in each row).

"<td>" & DATETIME_FORMAT({Date Sold},'M/D/YYYY') & "</td><td>" & Stock & "</td><td>" & Description & "</td><td>" & {Customer Sold To} & "</td><td>" & {Sold By} & "</td>"

Then, on the [Weekly Emails] table (screenshot below), I set up a rollup field called {Table} which looks at {Table Row} and creates an array, separated by table row tags with this formula:

"<tr>" & ARRAYJOIN(values, "</tr><tr>") & "</tr>"

Next, I set up the email template in Zapier:

End result in an email:

It’s not super pretty yet but the table is there! And it will adjust automatically depending on how many units were sold. Pretty excited about this one! Happy to help further if you want.


Formula to Join Arrays in Order?
#4

Nicely done and in two steps on Zapier!

I’ll have to carve out some time for this, thanks for the screen grabs and I’ll let you know if I get stuck!