Read and answer your Gmail from Telegram.
An email lands in your GmailIt shows up in your Telegram chat within a minute, the whole message.
Gmail in, Telegram out.
Set it up once. After that you don’t open anything, it just runs.
Set it up in 10 minutes
Create your Telegram bot
- In Telegram, open @BotFather and send
/newbot. - Pick a name, then a username ending in
bot. - BotFather replies with a token (it looks like
123456789:AAF…). Copy it.
Keep it secret. The token is your bot’s password. In the next step you paste it here, and it never leaves your browser except to talk to Telegram.
Connect your bot here
- Paste your bot token in the message box below and send it.
- Open your bot, tap Start and send “hi”.
- Tap I sent it. I’ll find your chat ID and put everything into your script.
Your token goes straight from your browser to Telegram. It isn’t saved or sent anywhere else, so you’ll paste it again if you reload the page.
Copy your ready-made script
- Your bot token and chat ID are already filled in at the top.
- Tap Copy my script. You’ll paste it into Google Apps Script next.
When the script is updated, your bot tells you and this page shows the new version.
You skipped connecting your bot, so this is the plain script. Set BOT_TOKEN and CHAT_ID at the top after pasting it.
Create your Google script
- Go to script.google.com signed in to the Gmail you want to forward.
- Tap New project and delete the sample code.
- Paste the script you copied.
Set your time zone
- In your Apps Script project, open Project Settings (the gear on the left).
- Tick “Show appsscript.json”, open it, and set
timeZoneto your time zone (for exampleAfrica/Lagos). - Save the project.
Skipped connecting your bot? Then also set BOT_TOKEN and CHAT_ID at the top of the script.
Test it, then switch it on
- Choose
testSendand press Run. - You’ll see an “unverified app” warning. That’s normal for your own script: Advanced → Go to project → Allow.
- Check Telegram for the test message.
- Run
setupTriggeronce. It now checks every minute, even with your phone off.
Try it for real
- Email yourself from another account.
- It shows up in Telegram within about a minute.
- Swipe-reply to it to answer by email.
- Send “Meeting tomorrow at 3pm” to test reminders.
Make reminders ring
- Open your bot’s chat → tap its name → Notifications → Customize.
- Pick a loud Sound, set Importance: Urgent, turn on Vibrate.
- Test: run
testMeetingCall. The reminder rings in about a minute. - Want a phone call too? Tap Start in @CallMeBot_txtbot. Your Telegram username is already in the script if you have one; if not, set
CALLMEBOT_USER.
Silent mode and Do Not Disturb still mute it.
Optional: make replies instant
- In your Apps Script project, click the blue Deploy button (top right), then New deployment.
- Click the gear icon next to Select type and choose Web app.
- Set Execute as to Me and Who has access to Anyone. Click Deploy, then Authorize access and allow it.
- Google now shows a Web app URL ending in
/exec. Click Copy. - At the top of the script, find
WEBAPP_URL: "",and paste the link between the quotes. Press Ctrl+S to save. - Choose
setupWebhooknext to Run and press Run. Telegram says “⚡ Instant replies are on”. - Test it: type
helpto your bot. It should answer in a second or two.
You can skip this card. Without it everything still works, the bot just answers within about a minute. New emails always take up to a minute (Google’s limit). If you use this, then every time you paste a newer script: Deploy → Manage deployments → pencil → Version: New version → Deploy.
Good questions.
Tap the notifications to read them.
Let’s connect.
Stuck on a step, found a bug, or have an idea? Message me. I reply to everyone and I’ll help you get it running.
Build it with me.
Mail to Telegram is free and open source. Fix a bug, add a feature, or just tell me what would make it better.
- 1ForkCopy the project to your GitHub.
- 2Pull requestMake your change and send it back.
- 3CheckedIt’s built, tested with a test bot and reviewed.
- 4MergedIt ships to everyone with the next update.
Loading…
helpsend emailsummarize or swipe-reply any email