Update Google Sheets After sending Email

Hi everyone,

I’m working on a workflow where I’m using Google Sheets to get input data. I have a loop set up that correctly reads the data and processes it: it takes a Word document template, applies changes from the input file, converts it to PDF, and sends it via email to the respective candidate.

Now, my next goal is to update a new Google Sheet (with the same headers) to track the status of emails sent. The problem is, the output I’m getting from the Gmail node only gives me the ID, thread ID, and label IDs. I’m not sure how to use this to mark the email as “sent” in my sheet.

Could anyone guide me on the best way to update the sheet after sending the email?

Thanks in advance!

In each loop use exactly one specific email address, in your case {{$("If").item.json.Email}}

In your sheet create a new column named target_email_addressand every time you loop through you map every entry to the email you sent to, i.e.:

target_email_address = {{$("If").item.json.Email}}

Add another column called email_sent and set it to yes in the same append step. This is the simplest solution to it.

Here is an example how it could look like:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.