sending sms from gsm phone connected to a rasberry pi zero.

31 views
Skip to first unread message

Mario Rossi

unread,
Oct 4, 2021, 4:49:10 AM10/4/21
to Google Apps Script Community
Hello to all. 

I thought about the possibility of sending sms when a cell of a google sheet is not empty or when it takes on a certain value. 
I found these links that seem useful: 




Have you ever had experience in this context? It looks like it's all python code so you don't put anything inside the google code. 

I await your consideration. 

Thanks

Clark Lind

unread,
Oct 4, 2021, 7:10:16 AM10/4/21
to Google Apps Script Community
Sounds like one of those auto-dialers I can't stand! lol  But in all seriousness, I get an alert on my cell phone from a spreadsheet through a series of interconnected steps. 
I have a form used in emergencies where an employee can enter information (like a report on the status of their facility, personnel, and mission capabilities during or right after a hurricane landing in their area).
1) Employee submits form
2) Function is triggered onFormSubmit()
3) Function grabs text from submission and sends email with a specific subject to my work Gmail account.
4) Gmail then uses a filter based on the subject and forwards to my cell phone via SMS.

In your example, you could use some onEdit() or onChange() methods to check & retrieve the desired data from the sheet and "push" the data somewhere that Python could get it. This could be a JSON file, or even another sheet that is published and used as a API with JSON (or CSV) output. The Python could do the rest. 
(I didn't look at any of the links, but I'll assume it can be done since in theory, it should be able to be done). 

Edward Wu

unread,
Oct 4, 2021, 2:53:23 PM10/4/21
to google-apps-sc...@googlegroups.com
If you know what cell service provider you're sending an SMS to, it could be as simple as sending an email.

Here's one list of providers and email addresses I found by Googling: https://www.digitaltrends.com/mobile/how-to-send-a-text-from-your-email-account/

e.g. if you want to send an sms to cell phone # 999-999-1234 and they're on AT&T, you just send an email to 99999...@mms.att.net

If you're trying to send SMS to a variety of services, you might want to look into something like Twilio. It's a bit more complicated to set up, and it costs a little bit of money, but we did something similar last year during coronavirus lockdowns where we used GAS to send SMS texts about office openings/closures to our employees' cell phones.


--
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/8f61473e-5eb7-40ee-9aef-9edf1a85a4cbn%40googlegroups.com.

Martin Hawksey

unread,
Oct 4, 2021, 4:19:43 PM10/4/21
to Google Apps Script Community
I've seen a couple of approaches to this specifically for Google Apps Script. Some examples are listed here https://pulse.appsscript.info/?s=SMS

Mario Rossi

unread,
Oct 5, 2021, 7:34:16 AM10/5/21
to google-apps-sc...@googlegroups.com
the sending of sms should be linked to the sending sheet and notification of receipt of sent emails.

When a user does not open the email after a few days (because he forgets to access his email or for other reasons such as an email that has accidentally ended up in spam) he may have the opportunity to receive an alert text message .

This will happen when in the google sheet the notification cell of the opening of the email by the user is not filled in (always if there is the mobile phone number in the respective column).

The fact of using python is because there doesn't seem to be any way to connect a gsm phone that sends and reads the message. Reading is important because you could create like a bot on the basis of the response obtained (for other cases not in this one). I have to check if the method reported by Martin Hawksey is also useful for reading the message.

To answer Edward Wu, I don't need to use web services if I don't have any costs with my tariff plan. However, I must respect the parameters for sending sms (there are a certain number of messages that can be sent per day in relation to those received and other parameters). 

Reply all
Reply to author
Forward
0 new messages