Send email using Google Apps Script via Android or desktop

17 views
Skip to first unread message

Henry Dishington

unread,
Aug 5, 2020, 6:11:16 AM8/5/20
to Google Apps Script Community

HI, everyone! I've been banging my head over this, so any help/ideas will be greatly appreciated!

I've got a Google script that converts a google sheet to a pdf, then emails the pdf as an attachment via Gmail. The script works great, but I need to be able to send the email (trigger the script) from Android and PC. Based on all of the searching I've done, I think that I need an installable onEdit trigger. Unfortunately, I have no idea how to write any code to do this, nor how to incorporate it into my existing script. To add insult to injury, the script needs to trigger based on specific text in a specific cell.

The "specific text in a specific cell" problem was solved by wrapping the script in an if statement. (If cell A1= "specific text, then execute the script)

So, I'm left with the task of watching a specific cell. When "specific text" is entered into a specific cell ("P36" in this case), I need the script to run.

How can I do this on Android?

Thanks again for any and all help!

Sitaram upadhya

unread,
Aug 5, 2020, 6:18:36 AM8/5/20
to Google Apps Script Community
Hi,
You can add a button on the Sheet.Based on whatever is entered on the sheet Button will take run the script taking the value entered on the cell.

Thanks,
Sitaram Upadhya
(satu...@gmail.com)

Henry Dishington

unread,
Aug 5, 2020, 7:27:39 AM8/5/20
to google-apps-sc...@googlegroups.com
I have already implemented your suggestion, and found that the button worked only on PC and not on mobile. I need something that works on both PC and Android.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/d2f0173b-38c9-49ab-b0ac-ce5c2c303990o%40googlegroups.com.

Martin Hawksey

unread,
Aug 5, 2020, 8:13:32 AM8/5/20
to google-apps-sc...@googlegroups.com
Hi Henry, 

How you implement this partly depends on your workflow but I've seen others use checkboxes in Google Sheet cells combined with installing an onEdit trigger to fire scripts e.g. https://stackoverflow.com/a/58583073/1027723 (checkboxes appear in the android sheets apps).

There are other solutions like using AppSheets and MITs App Inventor but imagine these would be more work than you need

Best
Martin



--
Martin Hawksey

Latest tweet (see how):

Apps Script IDE will be using the Monaco Editor that powers VS Code. Very nice indeed 😉. If there is any way to integrate with GitHub, it would be a powerful coding platform for teachers and students 😊💻 with so many possibilities 💯#GoogleAppsScript https://t.co/aqO5SLH93W

— Tim Sampson (@fullstackpanic) July 31, 2020
Reply all
Reply to author
Forward
0 new messages