Question

Trouble automating two emails using Google Sheets and Gmail and second email not sent as expected.

  • 14 July 2023
  • 1 reply
  • 25 views

Hi,

 

I’ve been trying to figure out how to automate a series of two emails, using Google Sheets and Gmail automations in Zapier. 

The logic should be fairly easy, based on a sent/not sent filtering.

Here is a quick explanation about how it should work:

  1. there is a Google sheet with 3 columns: Email address, Mail 1, Mail 2
  2. An email address is added to column Email, and the text “Not sent” is inserted under both  Mail 1 and Mail 2
  3. The email address should receive Mail 1 after 1 hour of being added to Google sheets
  4. The automation should change the status under Mail 1 from “Not sent” to “Sent”
  5. The email address should receive Mail 2 after 2 hours, from the moment when it received Mail 1

The Zapier sequence I created for this is as follows:

  1. New spreadsheet row in Google Sheets
  2. Filter: Only continue if Mail 1 column exactly matches Not Sent
  3. Delay for 1 hour
  4. Send email in Gmail
  5. Update Spreadsheet row in Google Sheet Mail 1 is updated to Sent
  6. Delay for 2 hours
  7. Only continue if Mail 1 column exactly matches “Sent” and Mail 2 exactly matches “Not sent”
  8. Send email in Gmail

 

The first email is sent as scheduled, after 1 hour. The value is changed for Mail 1  to Sent  but the second email is not sent, as you can see below.

 

Would appreciate any help! 

Thanks!


1 reply

Userlevel 7
Badge +11

Hi and welcome to the Community here @LaviniaM

Ah, it looks like the Filter isn’t seeing the updated value, it’s still seeing it as “Not Sent”:

4393dac91a2396d54f05b8eaecebcb29.png

If the filter is checking the Mail 1 and Mail 2 column fields from the trigger then that could be why the second email is not being sent out.

In which case, what you’d need to do here is add in a Lookup Spreadsheet Row (Google Sheets) action before that filter. This will allow the Zap to get the current values in the Mail 1 and Mail 2 columns for that row. Then update the filter to look at the values in the Mail 1 and Mail 2 columns that are output by the Lookup Spreadsheet Row action.

Can you give that a try and let us know how you get on?

Reply