Skip to main content

Hello! I'm looking for some guidance.

Is it possible to create a Zap that sends a single email via Gmail containing information from different columns in Google Sheets (but always related to the same user)?

I have a Google Sheets document with information related to a specific user (let's call them "First Name Last Name Test" - see screenshot).

What I want to do is send an email to "First Name Last Name Test" that includes all the rows of information related to them.

 

Is there a way to do it? 

Hi @Marypeople 

Help us have more info by posting screenshots with the format of the email template you are trying to use and where those dynamic values will be inserted.


Hi there @Marypeople,

Yes, that’s possible! 🙂

I’m not sure what trigger you’re planning to use for the Zap but you could use a Lookup Spreadsheet Rows (Advanced) action to find all the matching rows of information for a specific person listed in the spreadsheet. This would then give you all the rows details as line items. As you’re wanting to include this in the body of the email then you’d likely need to convert the line items into text using a Formatter action. Check out our Convert line items into text strings guide to see how to do that. Then in your Send Email (Gmail) action you’d map the necessary fields from the previous trigger and actions to the relevant fields in the Gmail action.

Hope that helps to get you pointed in the right direction. If I’ve misunderstood what you’re wanting to achieve here or you run into any trouble on that do let us know!


Hi @Marypeople 

Help us have more info by posting screenshots with the format of the email template you are trying to use and where those dynamic values will be inserted.

Hi Troy! Thanks for your help.

Here there is an screenshot of the email template i’m trying to use:

 

Hello Sam!

Hi there @Marypeople,

Yes, that’s possible! 🙂

I’m not sure what trigger you’re planning to use for the Zap but you could use a Lookup Spreadsheet Rows (Advanced) action to find all the matching rows of information for a specific person listed in the spreadsheet. This would then give you all the rows details as line items. As you’re wanting to include this in the body of the email then you’d likely need to convert the line items into text using a Formatter action. Check out our Convert line items into text strings guide to see how to do that. Then in your Send Email (Gmail) action you’d map the necessary fields from the previous trigger and actions to the relevant fields in the Gmail action.

Hope that helps to get you pointed in the right direction. If I’ve misunderstood what you’re wanting to achieve here or you run into any trouble on that do let us know!

I’ll try to follow up this, thanks! 


@Marypeople 

You can use the Looping Zap app to iterate thru each row.

Help: https://zapier.com/apps/looping/help

Map data points from GSheet Lookup Rows step into the Looping step, then map variables from the Looping step to the Gmail step.


@Marypeople

You can use the Looping Zap app to iterate thru each row.

Help: https://zapier.com/apps/looping/help

Map data points from GSheet Lookup Rows step into the Looping step, then map variables from the Looping step to the Gmail step.

Thanks for the idea. I’m strugeling to make it work. My Zap stills sends multiples email with information of each row. This is my zap:

 

 

And this is the result:

 

 


@Marypeople 

With the Zap trigger you are using, you likely don’t need the Looping step.

You would simply map data points from the GSheet step 1 into the Gmail Zap step where you want dynamic data points in the email template.

Post screenshots with how your Gmail Zap step is configured in EDIT mode.

 


@Marypeople

With the Zap trigger you are using, you likely don’t need the Looping step.

You would simply map data points from the GSheet step 1 into the Gmail Zap step where you want dynamic data points in the email template.

Post screenshots with how your Gmail Zap step is configured in EDIT mode.

 

 

I don't think I can map the data with the first step 😭, it only looks for the information in one row, while I need it to search for the information in 'row D' and 'row E' where the same email from 'row C' matches (so that it sends only one email with all the information, instead of multiples emails).

 

This is the Gmail screenshot:

When you suggested Looping by Zapier, I found this video to help me set it up: https://www.youtube.com/watch?v=_RT8yQkLRZ0

 

Now I’ll present another situation to clarify what I want to achieve: imagining that a user places multiple purchase orders that generate different tracking numbers (and its register in different rows), I want to be able to send just one email with all the information for all the purchase orders and tracking numbers from the same user.


@Marypeople

You won’t need the Looping step.

Instead add these Zap steps:

  • Action: GSheets - Lookup Spreadsheet Rows (Advanced)
    • Used to find 0+ rows for search criteria
  • Action: Formatter > Utilities > Line Items to Text
    • Used to format line items into text for how you want inserted into the email body

 


@Marypeople

You won’t need the Looping step.

Instead add these Zap steps:

  • Action: GSheets - Lookup Spreadsheet Rows (Advanced)
    • Used to find 0+ rows for search criteria
  • Action: Formatter > Utilities > Line Items to Text
    • Used to format line items into text for how you want inserted into the email body

 

 

It worked! Thank you so much 😁

 

But now I want to complicate things for the greater good (to make the information clearer for the user). Considering my first email template, will this work for every case? Not everyone will have just 3 outputs and information need to match

 


@Marypeople 

To handle different logic, add Paths: https://help.zapier.com/hc/en-us/articles/8496288555917

Each Path has a Filter.


@Marypeople

To handle different logic, add Paths: https://help.zapier.com/hc/en-us/articles/8496288555917

Each Path has a Filter.

 

I'm not sure if Paths is the solution, since I want to get to just one email with all the information instead of three different ones. I was testing Lookup (Advanced) to narrow down the filtering to the 'leader' from the result of the first Lookup (and then replicate the search for other values), but I'm doing something wrong.

 

 


@Marypeople 

For the Lookup Column select that from the dropdown list.

Use the ...] button at the right to change back from Custom to Static to select from the dropdown list.

 


@Marypeople

For the Lookup Column select that from the dropdown list.

Use the [...] button at the right to change back from Custom to Static to select from the dropdown list.

 

 

Doing it that way searches the entire row. I tried using the dynamic value so that it only searches among the options from the previous lookup (and sticks with just one user).

In other words, it should search for 'Líder' in the result of the previous lookup. Is my logic correct? Is this possible?

 

Thanks for your help!


@Marypeople 

The Lookup Row(s) supports 2 lookup columns if that helps narrow the results.

If you are trying to do a search for results within a previous set of results, then that would likely either involve custom code using the Code Zap app or the GSheets API using the GSheets API request Zap action.


@Marypeople

The Lookup Row(s) supports 2 lookup columns if that helps narrow the results.

If you are trying to do a search for results within a previous set of results, then that would likely either involve custom code using the Code Zap app or the GSheets API using the GSheets API request Zap action.

It helps! Thank you so much! 😁

I ended up doing a lookup step for each variable and another one with utilities to format it. It worked perfectly, thanks again!


That’s fantastic news @Marypeople! Thanks so much for following up here. Really pleased you were able to get this all sorted with Troy’s help - great work both of you! 🙌

Sounds like you’re all set for now but do reach back out in the Community if you need help with anything else. In the meantime, happy Zapping! ⚡️


Reply