Question

Send google sheet table by gmail in a daily basis

  • 27 October 2022
  • 4 replies
  • 340 views

Hi All,

Wanted to send a daily report that is a table in google sheet which will update everyday automatically. May I know how to convert the google sheet data/ table into the gmail body?

 

Thnaks


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +8

Hi @Thony1110 

 

This might be a bit tricky but I do like a challenge 😁

 

Unfortunately there has to be a manual part, problem is there is no way to get the embed code automatically, so you will need to go to Google Sheets > Select the spreadsheet you wanna share > Click File > Share > Publish to Web > Embed then copy the relevant code (you only need to do this once per spreadsheet you wanna share)

 

Since you have now the code (which looks something like this 

 

<iframe src="https://docs.google.com/spreadsheets/d/e/XXXXXX-XXXXXXXXXX_-XXXXXXXXX-XXXXXXXXX-XXXXXXXXX/pubhtml?widget=true&amp;headers=false"></iframe>

 

You can setup your zap in the following way: 

 

Trigger > Schedule by Zapier set to Every Day as per your needs

Action > Gmail > Send Email > Body Type = HTML then create your email in HTML 

 

you can add height & width like this

....headers=false" height="300" width="500"></iframe>

 

Hope this helps :) 

Userlevel 7
Badge +8

Hi @Thony1110 just wanted to check in and see if you have any outstanding questions or encountered any errors we can help you through?

Sorry I have tried the solution above but seems Gmail won’t be able to embed <iframe>

Userlevel 7
Badge +12

Hi @Thony1110, I’m sorry that @MohSwellam’s solution didn’t work (it’s an amazing idea, just a shame that Gmail doesn’t allow iframes). 

You could attach a pdf version of the table/sheet to the email? I know that it’s not exactly what you’re looking to do, but it would provide a way for people to easily view the table. 

To do that, use a Google Drive Find File action to search for your Google Sheets file and then in the send email step add the ‘File Pdf’ field to the attachments of the email. 

Do you think that would work for what you need?