Gmail: Activate SMS notification
In order to receive an SMS notification from Gmail when a specific email arrives, you have to make settings in various menus. We will guide you through the complete setup.
SMS notification in Gmail: save mobile number
First of all, you have to enter your mobile phone number on Google. However, not in Gmail, but in Google Calendar.
- Click the gear icon in Google Calendar and open the "Settings".
- Go to the "Mobile phone setup" tab and enter your mobile phone number.
- Then you have to request a confirmation code, then type it in the browser and save your entries with "Save".
Create a Gmail label for SMS
The next step is to create a label for sending SMS:
- To do this, scroll down on Gmail in the left menu bar ("Inbox"), click on "More" and at the bottom on "Create new label".
- Now name the new label in "SMS" (without quotation marks).
Create script for sending SMS
Since Gmail itself does not offer a function for sending SMS, you have to create a script for it with Google Drive.
- Open Google Drive and create a new "spreadsheet" via "Create".
- Then click on the "Tools" tab and select the "Script Editor".
- Close the quick selection and enter the following code:
- function sendText () {
- var label = GmailApp.getUserLabelByName ('SMS')
- var threads = label.getThreads ();
- var now = new Date (). getTime ();
- for (i in threads) {CalendarApp.createEvent ('IMP-' + threads [i] .getFirstMessageSubject (), new Date (now + 60000), new Date (now + 60000)). addSmsReminder (0); }
- label.removeFromThreads (threads); }
- Then click on the "Execute" button (see picture) and save the document under the name "SMS".
- Then click the "Execute" button again and have to authorize the script. To do this, select the button of the same name and click "Accept" in the new window.
- Note: If you get an error message, click "Run" again.
SMS function of the script: Check for new mail every minute
- Go to the "Resources" tab in Google Drive and select "Trigger the current project".
- Now you have to set up a new trigger with the following parameters: "sendtext" / "time controlled" / "minute timer" / "every minute" (see picture).
- Finally click on "Save".
Set SMS notification for certain emails
Finally, you only have to specify which sender (s) you want to be notified by SMS:
- In Gmail, click the small triangle at the right end of the search bar to see the "Options".
- Then enter in the "From" field the email address whose incoming mail you want to be notified about.
- Select "Create filter with these search criteria" and set the label "SMS" on the following page under "Apply label".
You can add any number of senders to the SMS label. Please note that a new appointment is always created in Google Calendar. You should delete them regularly if you use the calendar. Also read how to change the default SMS app on Android.