I have a Google Spreadsheet where I enter a row of data with any changes to my office schedule for the day. Is there a way to automatically email this row of data (not a link to the spreadsheet, but the actual row of data) to another person(s)?


You cannot send emails from the Google Sheet when an edit is made because the the onEdit trigger cannot call the MailApp service.

You can however save the edit in a queue through PropertyService and then use a time-based trigger to flush the queue and send the content via email.

| improve this answer | |

Follow these instructions to create a mail script: https://developers.google.com/apps-script/articles/sending_emails

Then within the script area click resources up the top and set the script to trigger On Change. Note that I think that will send emails you every time you change the doc, which you probably don't want. You could simply do it without triggers and manually run the script which isn't too much hassle.

If you want to send to the same person(s) each time hardcode the sender in the script. I imagine to send to multiple email addresses they are comma separated.

(Tangent: My company recently switched from using a massive Google Spreadsheet to https://www.floatschedule.com/ for managing employee schedules. If you're managing multiple employees (or your employer is) that might be easier for you/them. I also discovered I could hook my float schedule up to Google Calendar through ical, so I now have my daily work schedule as a calendar widget on my phone... Not affiliated with float, just find it a better workflow then clunky sheets.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.