0
votes

So I have a Google Spreadsheet with values pulled via ImportData. I want the contents of this spreadsheet (or if it's simpler, a range of cells) to be emailed to me on the last day of each month, at 12pm.

This is mainly because the API where the data is being pulled from only stores data up to 30 days.

Can someone help me out here? Or is there a better way of doing this? Thanks in advance for your feedback and advice.

2
You are member of SO for 2 years, you know it's not a good idea to ask for ready made code...search this forum for how to send sheet data using a script and look at the doc about installable triggers and give it a try. - Serge insas
Btw, look at the "related" column on the right... you'll get your answer. - Serge insas

2 Answers

1
votes

Essentially, what you need is to have a function that will:

  1. Pull the data from your spreadsheet, probably using getRange().getValues()
  2. Format that data into an email body, possibly using templated HTML
  3. Sends the email, probably using MailApp.

Then you want (after testing the function correctness) to set up a monthly trigger that will run the function.

0
votes

Since you didn't provide code, you might be looking for this zero-code Gsheet addon:

https://reactor.isvery.ninja

It does periodically send out emails.