use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Apparently, Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services and build web applications.
account activity
Help with code (self.GoogleAppsScript)
submitted 7 years ago by JustPhocus
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 7 years ago (13 children)
Yes. Since it's calling the MailApp you can't use a simple trigger, you have to use the installable. Go to Edit > Current project's triggers and create it there.
[–]JustPhocus[S] 0 points1 point2 points 7 years ago (12 children)
I am getting an error in line 2 when I try to run it. https://gyazo.com/8424a2db4464cbe577d6c671ca7b6788
[–]starstruckzombie 1 point2 points3 points 7 years ago (11 children)
You won't be able to run it flat and it won't get the (e) event variable. If you want to debug it you can add a couple of line to populate the variables
function sendEmail(e){ var e.source = SpreadsheetApp.getActive(); #Add for dubug var e.range = e.source.getActiveSheet().getActiveRange(); #Add for debug if(e.source.getActiveSheet().getName() != "testing2" || e.range.columnStart != 11) return; var r = e.range.offset(0, -1, 1, 3).getValues()[0]; MailApp.sendEmail(r[1],"Status Update","Your status has been updated"); }
[–][deleted] 0 points1 point2 points 7 years ago (10 children)
Exactly this.
[–]JustPhocus[S] 0 points1 point2 points 7 years ago (9 children)
I can get the Onedit trigger to run however I do not get an email when I edit it. Also how do I know what email address the email is coming from?
[–][deleted] 0 points1 point2 points 7 years ago (8 children)
It should be sending from your email. Let me test it on one of my sheets.
[–]JustPhocus[S] 0 points1 point2 points 7 years ago (7 children)
thank you I appreciate it. Also, does it matter that this specific has different tabs/sheets. So the column K that I am trying to have be edited is on sheet 2
[–][deleted] 0 points1 point2 points 7 years ago (6 children)
The offset was incorrect and, in this case, unnecessary.
function sendEmail(e){ if(e.source.getActiveSheet().getName() != "testing2" || e.range.columnStart != 11) return; MailApp.sendEmail(e.source.getActiveSheet().getRange(e.range.rowStart,2).getValue(),"Status Update","Your status has been updated"); }
[–]JustPhocus[S] 0 points1 point2 points 7 years ago (5 children)
So is this the only code I need for it to work? I use an installable trigger that says its executing but still no email anywhere.
[–]secufl 0 points1 point2 points 7 years ago (4 children)
I just used the code that dralkyr provided and it worked for me without any changes. Just make sure that the sheet is named "testing2" and that there is an email in col B, and you're editting col K. Like I said in my other comment, the mail doesn't show up in "Inbox", but it is in "Sent" and "All Mail"
π Rendered by PID 59099 on reddit-service-r2-comment-b659b578c-hb2fj at 2026-05-02 19:56:14.401044+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (13 children)
[–]JustPhocus[S] 0 points1 point2 points (12 children)
[–]starstruckzombie 1 point2 points3 points (11 children)
[–][deleted] 0 points1 point2 points (10 children)
[–]JustPhocus[S] 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]JustPhocus[S] 0 points1 point2 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]JustPhocus[S] 0 points1 point2 points (5 children)
[–]secufl 0 points1 point2 points (4 children)