@BalazsKovacs
There are many ways to accomplish the task you mentioned. Here is one idea…
Use a GoogleSheet to trigger the email and select the content of the email body.
Spreadsheet columns
firstName, lastName, email, go, cars, bikes, trains, planes
Place a ‘X’ in the cars, bikes, trains or planes column to include that section in the email body.
How do I trigger this?
Update the column “go” with the word NOW.
Create a zap that has these steps
- GoogleSheet Update on a cell called Go
- Zapier Filter - Does the Go cell say NOW?
- Zapier Code - JavaScript - Format the emailInsert (code below)
const sendCars = inputData.sendConsents;
const sendBikes = inputData.sendNotes;
const sendTrains =inputData.sendCancels;
const sendPlanes = inputData.sendPayments;
// Initialize emailInsert variable
let emailInsert ='';
// Check each variable and add corresponding sentences to emailInsert
if (sendCars === 'x') { emailInsert += 'You should drive a car.\n'; }
if (sendBikes === 'x') { emailInsert += 'You should have a bike in the boot.\n'; }
if (sendTrains === 'x') { emailInsert += ‘You should take a train.\n'; }
if (sendPlanes === 'x') { emailInsert += ‘You should book a plain.\n'; }
output = {emailInsert: emailInsert}];
- GoogleSheet Update - Set Go to Done
- GMail - Send the mail - Use the emailInsert in the email body
I hope this helps!
Zap Support @ GetUWired
Hi @BalazsKovacs
Good question.
One option is to use Filters/Paths.
Note: Paths requires a Zapier Pro+ plan.
Hello guys,
Thank you for sharing your insights. My preference is to send just one email to the client, so I'm afraid that using Filters/Paths might not be the ideal solution in this situation.
@GetUWired, I must admit that I'm finding the current Zapier setup a bit complex. Would it be possible for you to simplify it or recommend a more straightforward way to execute the task?
Your support is invaluable, and I truly appreciate your attention to this matter. Thank you all!
Best regards, Balazs
@BalazsKovacs
Perhaps look into using a Lookup Table: