How to Get SMS Alerts for Gmail via Twitter

How do you get SMS notifications on your mobile phone for important emails in your Gmail? Google doesn’t support text notifications for their email service but Twitter does. If we can figure out a way to connect our Twitter and Gmail accounts, the Gmail notifications can arrive as text on our mobile via Twitter. Let me explain:

Twitter allows you to follow any @user via a simple SMS. They provide short codes for all countries (see list) and if you text FOLLOW to this shortcode following by the  username, any tweets from that user will arrive in your phone as text notifications. For instance, if you are in the US, you can tweet FOLLOW labnol to 40404 to get my tweets as text messages. Similarly, users in India can text FOLLOW labnol to 9248948837 to get the tweets via SMS.

The short code service of Twitter can act as a Gmail SMS notifier. You create a new Twitter account, set the privacy to private and this account will send a tweet when you get a new email in Gmail. Follow this account via SMS from you main Twitter account and the SMS notifications will start pouring in.

gmail messages in twitter timeline

Use Twitter as a Gmail Notifier with Google Scripts

Here’s a step by step guide on how you can use Twitter to get SMS notification for important email in your Gmail account. It will take a minute to setup and, internally, there’s a Google Apps Script that’s doing all the magic. It monitors your Gmail mailbox in the background and as soon as a new message arrives in your account, the script sends out a tweet.

  1. Log out of your existing Twitter account and then go to twitter.com/signup to create a new Twitter account for your Gmail account.
  2. Confirm your email address, then open the Twitter settings page and check the option “Protect My Tweets.” This will make your Gmail notifications private and neither search engines nor other Twitter users will be able to see tweets generated through Gmail.
  3. Click here to copy the Google Sheet and choose Authorize under the Gmail to Twitter menu (near Help). Remember to authorize with your new Twitter account.
  4. Once authorized, choose Start from the Gmail to Twitter menu and enter your Gmail search query. For instance you can say _is:important is:unread in:inbox newer_than:1d _to only receive notification for new, unread and important emails in your Gmail. Click OK.

That’s it. The Gmail notifier is running and it will tweet when a matching email is found. It runs every 10-15 minutes and will only work on incoming email, not the old message. The messages will also be logged in the Google Sheet so you know what’s happening behind the scene.

Get SMS Alerts for Emails at Gmail

Open a new browser session in Incognito mode, log in to your old Twitter account and send a follow request to your new Gmail account on Twitter. Approve the new follower request and you should now see tweets for new Gmail messages, as they arrive, in your main Twitter timeline.

Should you wish to receive SMS alerts on your mobile phone for new Gmail messages, just open the Twitter profile page of your Gmail bot and turn on Mobile Notifications. This will obviously work only if you have connected (and verified) your mobile phone with your main Twitter account.

Also see: How to Write a Twitter Bot

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.