Yinan Wang
Yinan Wang

Reputation: 173

Periodically send email from Google Spreadsheet

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.

Upvotes: 0

Views: 1287

Answers (2)

coderofsalvation
coderofsalvation

Reputation: 1803

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.

Upvotes: 0

Ryan Roth
Ryan Roth

Reputation: 1424

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.

Upvotes: 1

Related Questions