Jan 25, 2019 06:50 AM
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!
Jan 27, 2019 05:08 AM
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!
Jan 27, 2019 08:33 AM
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.
Jan 27, 2019 02:58 PM
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!
Oct 03, 2021 01:39 PM
I tried to replicate this in Airtable automations’ “Gmail: Send Email”-action. Though the HTML output draws the table correctly when copied in a html viewer, the email won’t display the table correctly.
I wondered whether you might have tested this and be aware what could be the issue?
Thanks,
Ricardo