Gmail to Telegram, newsletter digests you will read
Your inbox is full of newsletters you want to read, but the experience is awful. Too many tabs, too much scanning, and the good ideas get buried under “later” bookmarks that never happen.
This is where a Gmail Telegram digest helps marketing managers stay sharp, founders keep up with industry shifts, and busy consultants avoid the inbox black hole. You send one number in Telegram (like “2”), and you get one clean brief back.
Below is the exact automation behind it, what it solves in real life, and what you’ll need to run it without babysitting formatting or message limits.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Gmail to Telegram, newsletter digests you will read
flowchart LR
subgraph sg0["Telegram Flow"]
direction LR
n0@{ icon: "mdi:message-outline", form: "rounded", label: "Get many messages", pos: "b", h: 48 }
n1["<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"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n3@{ icon: "mdi:message-outline", form: "rounded", label: "Get a message", pos: "b", h: 48 }
n4["<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/code.svg' width='40' height='40' /></div><br/>Get days"]
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/code.svg' width='40' height='40' /></div><br/>Get message data"]
n6["<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/code.svg' width='40' height='40' /></div><br/>Merge"]
n7["<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/code.svg' width='40' height='40' /></div><br/>Create TG message"]
n8["<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/code.svg' width='40' height='40' /></div><br/>Sanitize"]
n9["<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/code.svg' width='40' height='40' /></div><br/>Split"]
n10["<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/code.svg' width='40' height='40' /></div><br/>Clean"]
n11["<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/>Send a message"]
n12@{ icon: "mdi:robot", form: "rounded", label: "Message a model", pos: "b", h: 48 }
n10 --> n12
n6 --> n7
n9 --> n8
n4 --> n0
n8 --> n11
n3 --> n5
n2 --> n6
n2 --> n3
n12 --> n2
n5 --> n10
n1 --> n4
n7 --> n9
n0 --> n2
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 n1 trigger
class n12 ai
class n4,n5,n6,n7,n8,n9,n10 code
classDef customIcon fill:none,stroke:none
class n1,n4,n5,n6,n7,n8,n9,n10,n11 customIcon
The Challenge: Newsletters Pile Up Faster Than You Can Read
Newsletter reading sounds simple until you’re juggling a real workload. You open Gmail to “quickly scan,” then get pulled into replies, threads, and random admin. Meanwhile, the newsletters you actually care about are scattered across days, senders, and subject lines that don’t match what’s inside. When you finally do set aside time, it’s a messy batch job: search, open, skim, copy snippets, and try to remember what mattered. Honestly, the mental load is worse than the time.
It adds up fast. Here’s where it usually breaks down in practice.
- You waste about 10 minutes per newsletter just finding the “real” sections worth reading.
- Skimming across multiple days means you miss patterns, because the takeaways never get consolidated.
- Forwarding interesting bits to a team chat turns into copy-paste chaos, and people stop trusting the signal.
- Long digests don’t fit cleanly in Telegram, so formatting breaks and you end up editing by hand.
The Fix: On-Demand Gmail Newsletter Digests Inside Telegram
This workflow turns “I should read those newsletters” into a quick Telegram command you’ll actually use. You message your Telegram bot with a number of days (like 1, 2, or 7). n8n converts that into Gmail’s after: search format, pulls every matching newsletter email, then processes them one-by-one. For each email, it extracts the HTML content, subject line, sender name, and date, and sends that package to an OpenAI model (GPT-4.1-mini by default). The model returns structured JSON topics, so each newsletter becomes a few clean bullets instead of a wall of text. Finally, everything is merged into one readable digest, split into safe-sized chunks for Telegram, sanitized into Telegram-friendly HTML, and delivered back to your chat with link previews turned off.
The workflow starts in Telegram, not Gmail, which means you control the timing. Gmail pulls the emails based on the date window and your sender filters, OpenAI summarizes into consistent topic objects, and Telegram receives one consolidated digest (even if it needs to arrive as multiple parts).
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you get 12 newsletters in a week and you want a Friday wrap-up. Manually, you might spend about 8 minutes per email between searching, opening, skimming, and saving takeaways, which is roughly 90 minutes. With this workflow, you send “7” in Telegram, wait for processing, and read one combined digest (even if it arrives as 2–3 Telegram parts). Your active time drops to about 10 minutes, and you still capture the best ideas.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram for the bot command and digest delivery.
- Gmail to search and retrieve your newsletter emails.
- OpenAI API key (get it from your OpenAI dashboard’s API keys page).
Skill level: Intermediate. You’ll connect accounts, paste an API key, and adjust a Gmail search filter (no coding required, but you should be comfortable editing a few fields).
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A Telegram message kicks it off. You send a number like “2” to your bot, and the trigger is locked to your Telegram user ID so nobody else can run it.
Gmail gets queried for the right time window. n8n converts that number into a YYYY/MM/DD date for Gmail’s after: filter, then pulls message IDs using your custom search query (including optional sender allowlists).
Each email gets summarized into structured topics. The workflow retrieves the full message, extracts the HTML and key fields, then asks an OpenAI Chat Model to return JSON topics with consistent title/description metadata. That JSON-first approach matters because it keeps your digest clean, even when newsletter layouts are messy.
Your digest is built, chunked, and sanitized for Telegram. Topics from all emails are merged into one enumerated message with bold headings, then split into 3,500-character parts and converted to Telegram-safe HTML before sending (previews disabled).
You can easily modify the Gmail sender filters to focus on only the newsletters you trust, so the brief stays tight. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
This workflow starts when a Telegram message is received, providing the number of days to look back for emails.
- Add the Telegram Intake Trigger node and set Updates to
message. - In Additional Fields, set chatIds to
[YOUR_ID]. - Credential Required: Connect your telegramApi credentials.
[YOUR_ID].Step 2: Connect Gmail and Retrieve Emails
These nodes fetch emails based on the date computed from the Telegram input and iterate through results.
- In Retrieve Bulk Emails, set Operation to
getAlland Return All totrue. - Set Filters → q to
=(from:____@____.com) OR (from:____@____.com) OR (from:____@____.com -"____") after:{{ $json.dateString }}. - Credential Required: Connect your gmailOAuth2 credentials to Retrieve Bulk Emails.
- In Fetch Single Email, set Message ID to
={{ $json.id }}and keep Operation asget. - Credential Required: Connect your gmailOAuth2 credentials to Fetch Single Email.
Step 3: Set Up Email Processing and Digest Input
This section computes the lookback date, extracts email details, and prepares data for the LLM.
- Keep Compute Past Days as-is to convert the Telegram message text into a
dateStringused by Retrieve Bulk Emails. - Use Extract Email Details to parse HTML, sender, subject, and date from each Gmail message.
- Use Prepare Digest Input to convert dates to
MM.DDand passhtml,subject,from, anddateto the next step. - Confirm the flow: Telegram Intake Trigger → Compute Past Days → Retrieve Bulk Emails → Batch Iterator → Fetch Single Email → Extract Email Details → Prepare Digest Input.
7). Non-numeric input will result in invalid date filters.Step 4: Set Up AI Summarization
The LLM generates structured JSON topics for each email, which later become the digest.
- In LLM Summary Request, set Model to
GPT-4.1-MINIand enable JSON Output. - Ensure the message content includes the expressions
{{ $json.subject }},{{ $json.from }},{{ $json.date }}, and{{ $json.html }}as shown in the node. - Credential Required: Connect your openAiApi credentials to LLM Summary Request.
- Confirm the flow: Prepare Digest Input → LLM Summary Request → Batch Iterator (looping through all emails).
Step 5: Configure Digest Assembly and Telegram Output
These nodes build the digest, split it into safe-sized chunks, sanitize it for HTML, and send it to Telegram.
- Use Combine Topics to merge the LLM topics array, then send it to Build Telegram Digest.
- In Chunk Message Text, keep the chunk logic to split long content into
3500-character pieces. - Ensure Format HTML Safe remains directly after Chunk Message Text to convert Markdown to HTML safely.
- In Dispatch Telegram Post, set Text to
={{ $json.text }}and Chat ID to[YOUR_ID]. - In Dispatch Telegram Post, set Parse Mode to
HTML, Disable Web Page Preview totrue, and Append Attribution tofalse. - Credential Required: Connect your telegramApi credentials to Dispatch Telegram Post.
Step 6: Test and Activate Your Workflow
Validate the end-to-end flow by sending a test message to the Telegram bot.
- Click Execute Workflow in n8n and send a Telegram message like
7to the bot. - Verify that emails are retrieved, summarized, and aggregated into a digest.
- Confirm that Dispatch Telegram Post posts one or more messages to your Telegram chat.
- Once successful, toggle the workflow to Active for production use.
Watch Out For
- Gmail OAuth credentials can expire or lose permission after a password/security change. If the workflow suddenly returns zero messages, check the Gmail credential status in n8n first, then re-auth.
- If you’re using Wait-like behavior via external processing (LLM latency) or you get large batches, processing times vary. Bump up your batch size settings carefully and watch for downstream nodes failing when the OpenAI response is delayed.
- OpenAI prompts are only “good defaults.” Add your own rules early (tone, language, what to ignore in certain senders), or you will keep editing digests and quietly hate the whole idea.
Common Questions
About 30 minutes if your Gmail, Telegram bot, and OpenAI key are ready.
Yes, but someone needs to be comfortable connecting OAuth and pasting an API key. After that, it’s mostly adjusting the Gmail search filter and testing with a few runs.
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 depend on email volume and 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.
You can tailor it in three practical places: the Gmail search query (to include only certain senders or labels), the OpenAI “Message a model” prompt (to enforce your tone and what to ignore), and the “Build Telegram Digest” step (to change formatting). If you want German summaries but English subject lines, set that directly in the prompt rules. If one sender always includes promo blocks, add a rule telling the model to skip those sections for that sender.
Usually it’s a wrong bot token or the chat ID restriction doesn’t match your Telegram user ID. Double-check the Telegram Trigger’s allowed chatIds and the Send Message node’s chatId, then re-test by sending a simple number like “1.” If it still fails, regenerate the bot token with BotFather and update the credential in n8n.
It depends on how many emails you pull in each run and how large they are, but most setups handle a week’s worth of newsletters comfortably.
For this use case, n8n is a better fit when you care about control and formatting. You’re doing batch processing, looping over many emails, extracting HTML, forcing JSON output from an LLM, then chunking and sanitizing for Telegram’s limits. Zapier and Make can do parts of that, but complex looping and “clean up the output so it never breaks” logic gets painful fast, and pricing can jump when you run bigger batches. If you only want a simple “new email → send summary” flow, those tools are fine. Talk to an automation expert if you want help picking the cleanest approach.
This is one of those automations that feels small until you use it for a week. Your inbox stays noisy, but your reading doesn’t have to.
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.