Telegram to Gmail, send polished emails from chat
You’re in Telegram, someone pings you, and you think: “I should email this.” Then you open Gmail, lose the thread, rewrite the same phrases, and second-guess the tone.
This Telegram Gmail automation hits busy founders hardest, but marketers and client-facing consultants feel it too. You end up spending more time switching apps than actually communicating clearly.
This workflow turns a Telegram message into a ready-to-send Gmail email, written in a consistent voice, with a confirmation sent back to your chat so you know it went out.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Telegram to Gmail, send polished emails from chat
flowchart LR
subgraph sg0["Telegram Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram Trigger"]
n1@{ icon: "mdi:robot", form: "rounded", label: "AI Agent", pos: "b", h: 48 }
n2@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n3@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n4@{ icon: "mdi:message-outline", form: "rounded", label: "Gmail", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Telegram"]
n4 -.-> n1
n1 --> n5
n3 -.-> n1
n0 --> n1
n2 -.-> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n1 ai
class n2 aiModel
class n3 ai
classDef customIcon fill:none,stroke:none
class n0,n5 customIcon
The Problem: Sending “quick emails” is never quick
Most “I’ll just send an email” moments happen when you’re not in email mode. You’re in Telegram, walking between meetings, or finishing a task, and you need to respond like a professional human (not a rushed robot). So you copy details from chat, open Gmail, paste, format, rewrite the subject line, then stare at the draft because you don’t want it to sound curt. Multiply that by a few times a day and it becomes a sneaky time sink. Worse, it’s inconsistent. Some emails are great. Others are “sent from my phone, sorry.”
The friction compounds. Here’s where it breaks down.
- Every context switch from chat to inbox costs attention, and you pay that cost repeatedly all day.
- Subject lines and tone drift, especially when you’re replying fast or late at night.
- Manual copy-paste invites small mistakes like the wrong recipient or missing key details from the thread.
- You don’t get a clean feedback loop, so you’re left wondering if the email actually sent.
The Solution: Send Gmail emails from Telegram with an AI email agent
This n8n workflow turns a simple Telegram message into a structured email draft that can be sent through Gmail automatically. You message your Telegram bot like you normally would: who the email is for, what it’s about, and any context. An AI agent (powered by an OpenAI chat model) reads your message, keeps a bit of short-term conversation context, then converts what you said into the three parts that matter: the recipient, the subject, and the body. After that, Gmail sends the email from your connected account. Finally, Telegram replies back with a confirmation so you’re not guessing. Honestly, it feels like having a tiny assistant living in your chat app.
The workflow starts when a Telegram bot receives your message. The AI agent interprets it and formats a polished email using your preferred tone and structure. Gmail sends it, then Telegram confirms the send status right where you started.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you send 5 short emails a day that start as Telegram conversations (client updates, intros, quick confirmations). Manually, you might spend about 10 minutes each switching apps, rewriting, and double-checking details, which is close to an hour daily. With this workflow, you drop a single message into Telegram (about a minute), let the AI compose, and Gmail sends in the background. Even if you spend a couple minutes reviewing the occasional draft, most teams get roughly 40 minutes back per day.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram to receive messages via your bot
- Gmail to send emails from your account
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Beginner. You’ll connect accounts, paste an API key, and tweak the email style prompt if you want.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A Telegram message kicks it off. Your Telegram bot listens for incoming messages, so you can “request an email” the moment you think of it.
The AI agent interprets what you meant. It uses an OpenAI chat model to extract the recipient, subject, and a clean email body from your natural language. If you send a follow-up like “make it shorter,” session memory helps the agent understand what “it” refers to.
Gmail sends the finished email. Once the content is structured, the Gmail tool sends the message from your connected account using OAuth credentials.
Telegram confirms the outcome. You get a reply in chat, so you know the email went out (or you’ll see an error message you can act on).
You can easily modify the agent’s tone and formatting to match your brand voice based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
Set up the Telegram trigger so the workflow starts when a new message arrives.
- Add and open Incoming Telegram Hook.
- Confirm the trigger listens to messages by keeping Updates set to
message. - Credential Required: Connect your Telegram Bot API credentials (this node needs credentials but none are configured).
Step 2: Connect Telegram and Gmail Services
Ensure outbound messaging and email sending can run when the AI determines an email action is needed.
- Open Telegram Reply Sender and verify Text is set to
{{ $json.output }}. - Set Chat ID to
{{ $('Incoming Telegram Hook').item.json.message.chat.id }}to reply to the same user. - Credential Required: Connect your Telegram Bot API credentials (this node needs credentials but none are configured).
- Open Gmail Send Tool and keep Email Type set to
text. - Verify fields are mapped for AI output: Send To
{{ $fromAI('To', ``, 'string') }}, Subject{{ $fromAI('Subject', ``, 'string') }}, and Message{{ $fromAI('Message', ``, 'string') }}. - Credential Required: Connect your Gmail OAuth2 credentials on AI Orchestrator (the Gmail Send Tool is an AI tool sub-node; add credentials to the parent node).
Step 3: Set Up AI Orchestration and Memory
Configure the AI agent to interpret Telegram messages, use the OpenAI model, and maintain session context.
- Open AI Orchestrator and set Text to
{{ $json.message.text }}so it reads the incoming message. - Ensure Prompt Type is set to
define. - Open OpenAI Dialogue Model and confirm the model is
gpt-4o-mini. - Credential Required: Connect your OpenAI API credentials on AI Orchestrator (the OpenAI Dialogue Model is a language model sub-node; add credentials to the parent node).
- Open Session Memory Buffer and set Session Key to
{{ $json.message.chat.id }}with Session ID Type set tocustomKey.
Step 4: Confirm Execution Flow and Output Behavior
Verify the nodes are connected in the correct sequence and respond via Telegram after AI processing.
- Confirm the flow runs Incoming Telegram Hook → AI Orchestrator → Telegram Reply Sender.
- Verify Flowpast Branding is informational only and does not affect execution.
- Ensure AI Orchestrator has the AI connections attached for OpenAI Dialogue Model, Session Memory Buffer, and Gmail Send Tool.
Step 5: Test and Activate Your Workflow
Run a live test and then activate the workflow for production use.
- Click Execute Workflow and send a test message to your Telegram bot.
- Confirm that Telegram Reply Sender returns an AI-generated response in the same Telegram chat.
- If the AI decides to email, verify that Gmail Send Tool sends the message using the
To,Subject, andMessagefields produced by AI. - Once confirmed, toggle the workflow to Active to enable continuous automation.
Common Gotchas
- Gmail credentials can expire or need specific permissions. If things break, check your Google OAuth connection in n8n’s Credentials list first.
- If you’re using memory heavily, context can get confusing when multiple people share one bot. Keep the chat ID-based session memory enabled, and test with two accounts before rolling it out.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your Telegram bot and Gmail login are ready.
No. You’ll connect Telegram, Gmail, and OpenAI, then adjust a couple of settings.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per batch of emails depending on length.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. Update the AI Agent instructions to include your tone (formal, friendly, concise), add a default sign-off, and tell it how to format links and bullet points. If you want different templates for different situations (sales follow-up vs. support reply), route messages through a Switch in n8n based on keywords like “proposal” or “refund.”
Most of the time it’s expired or revoked OAuth access. Reconnect Gmail in n8n Credentials, then run one manual test execution to confirm it can send. If it still fails, check that the Google account allows third-party access and that you’re not trying to send from an alias Gmail won’t permit. Rate limits can also show up if you blast a lot of emails quickly, so slow it down if needed.
A lot, but Gmail sending limits are usually the real cap.
It depends on how “smart” you want the workflow to be. Zapier and Make can send an email from Telegram, sure, but once you add an AI agent, session memory, and conditional logic, costs and complexity ramp up fast on those platforms. n8n is comfortable with branching logic and lets you self-host, which matters if you’re sending lots of messages. Also, n8n’s LangChain-style agent setup is made for this “chat in, structured output out” pattern. If you just need a simple forwarder, Zapier or Make might be quicker. If you want a real assistant you can evolve, n8n wins more often. Talk to an automation expert if you’re on the fence.
Once this is running, sending a polished email becomes a quick chat message. The workflow handles the repetitive parts so you can stay focused on the actual conversation.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.