Telegram to LinkedIn, polished posts with approval
You jot a smart idea in Telegram, then it dies there. Or it turns into a “quick LinkedIn post” that somehow takes an hour, three rewrites, and a bunch of second-guessing.
Marketing managers feel it when consistency slips. Founders feel it when they’re doing content at 11 PM. And consultants who live on LinkedIn know the pain of turning messy inputs into a clean, on-brand voice. This Telegram LinkedIn automation fixes that loop.
You send text, voice, or a PDF to a Telegram bot. It turns that into a draft, asks for approval in chat, and only then publishes to LinkedIn (and X, if you want). Here’s what’s happening behind the scenes, and what you’ll need to run it.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Telegram to LinkedIn, polished posts with approval
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:swap-vertical", form: "rounded", label: "Set input context", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Text prompt", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Document prompt", 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/httprequest.dark.svg' width='40' height='40' /></div><br/>Describe audio"]
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Audio prompt", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "AI Agent", pos: "b", h: 48 }
n7@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n8@{ icon: "mdi:vector-polygon", form: "rounded", label: "Embeddings Google Gemini", pos: "b", h: 48 }
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/telegram.svg' width='40' height='40' /></div><br/>Send response"]
n10@{ icon: "mdi:cog", form: "rounded", label: "Create X (Twitter) post", pos: "b", h: 48 }
n11@{ icon: "mdi:memory", form: "rounded", label: "Chat Memory Manager", pos: "b", h: 48 }
n12@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n13["<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/>Error"]
n14["<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/>Success"]
n15@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n16@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n17["<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 agent's response"]
n18@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Input type switch", pos: "b", h: 48 }
n19@{ icon: "mdi:cog", form: "rounded", label: "Encode document", pos: "b", h: 48 }
n20@{ icon: "mdi:cog", form: "rounded", label: "Encode audio", pos: "b", h: 48 }
n21["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Describe document"]
n22@{ icon: "mdi:cog", form: "rounded", label: "Create post in LinkedIn as a..", pos: "b", h: 48 }
n23@{ icon: "mdi:cog", form: "rounded", label: "Create post in LinkedIn as a..", pos: "b", h: 48 }
n24@{ icon: "mdi:memory", form: "rounded", label: "Retrieve knowledge", pos: "b", h: 48 }
n25@{ icon: "mdi:wrench", form: "rounded", label: "Save knowledge", pos: "b", h: 48 }
n26["<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/>Download audio"]
n27["<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/>Download document"]
n12 --> n11
n12 --> n13
n6 --> n17
n16 --> n9
n2 --> n6
n5 --> n6
n20 --> n4
n15 -.-> n6
n15 -.-> n11
n4 --> n5
n26 --> n20
n25 -.-> n6
n3 --> n6
n19 --> n21
n0 --> n1
n21 --> n3
n27 --> n19
n18 --> n2
n18 --> n27
n18 --> n26
n18 --> n12
n1 --> n18
n24 -.-> n6
n11 --> n14
n17 --> n16
n10 -.-> n6
n8 -.-> n24
n7 -.-> n6
n23 -.-> n6
n22 -.-> n6
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 n6 ai
class n7 aiModel
class n25 ai
class n11,n15,n24 ai
class n8 ai
class n12,n18 decision
class n4,n21 api
class n17 code
classDef customIcon fill:none,stroke:none
class n0,n4,n9,n13,n14,n17,n21,n26,n27 customIcon
The Problem: Great ideas don’t survive the rewrite
Most LinkedIn posts don’t fail because the idea was bad. They fail because the process is annoying. Your notes are in Telegram, your research is in PDFs or screenshots, your voice memo has the “real” wording you want, and LinkedIn is waiting for something polished. So you copy-paste between apps, try to summarize a document without losing the point, and rewrite until the post sounds generic. Then you hesitate. Is it on-brand? Is it too long? Did you forget a key detail? That mental load is what kills consistency.
It adds up fast. Here’s where it breaks down in real life:
- You spend about 30 minutes turning raw notes into something publishable, and you still don’t love it.
- Voice messages have your best phrasing, but transcribing and cleaning them is a chore.
- PDFs and decks hold the facts, yet you end up skimming and guessing what matters.
- Without an approval step, “automated posting” becomes “automated regret,” so you keep doing it manually.
The Solution: Telegram drafts that wait for your approval
This workflow turns Telegram into your content inbox, then uses AI to do the heavy lifting without skipping the human check. It starts when you message a Telegram bot with text, a voice note, an image, or a document (like a PDF or a presentation). n8n identifies what you sent, extracts the content, and feeds it into an AI “social content agent” that knows how to write a LinkedIn-ready post. The workflow also keeps a long-term memory of key context (your company, what you do, your product, your tone), so you don’t have to restate it every time. Finally, you get a draft back in Telegram, you approve it in chat, and only then does it publish to LinkedIn (personal or company) and optionally to X.
The workflow starts with a Telegram intake trigger, then routes by input type (text vs. audio vs. document). Audio gets fetched and transcribed, documents get summarized, and everything ends up as a clean prompt for the AI agent. After the agent generates the draft, the bot sends it back to you for verification, and the LinkedIn node publishes only after you confirm.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you publish 4 LinkedIn posts a week. Manually, if each one takes about 30 minutes to draft, tighten, and format, that’s roughly 2 hours every week just on first drafts. With this workflow, you drop a voice note or a PDF into Telegram (about 2 minutes), wait a few minutes for transcription, summarization, and drafting, then approve in chat. You still review, but the “blank page” work mostly disappears, so you get that 2 hours back for editing, client work, or honestly just being done.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram for capturing messages and approvals
- LinkedIn to publish personal or company posts
- Google AI Studio API key (get it from Google AI Studio)
Skill level: Intermediate. You’ll connect credentials, set a few environment values, and test each input type once.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You message the Telegram bot. A Telegram trigger picks up text, a voice note, or a file upload. The workflow maps basic context right away so it can handle replies and approval cleanly.
Your input gets normalized. Documents are fetched and encoded, then summarized so the AI doesn’t have to “read” a huge file raw. Voice notes are fetched, encoded, and sent through transcription before drafting begins.
An AI agent drafts the post with memory. The workflow looks up your saved knowledge (who you are, what you do, product details, brand voice cues) and merges it with today’s input. That’s how you get posts that sound like you instead of a generic template.
You approve, then it publishes. The draft is sent back in Telegram, and the workflow waits for your confirmation. Once approved, it can publish to LinkedIn as a personal post or company post (and it also supports X if you enable it).
You can easily modify the approval rules to add extra checks based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Telegram Trigger
Start by setting up the Telegram entry point so the workflow can receive messages, documents, voice notes, and callback actions.
- Add and open Telegram Intake Trigger.
- Set Updates to include
message,callback_query,inline_query, and*. - Credential Required: Connect your telegramApi credentials in Telegram Intake Trigger.
Step 2: Map and Route Incoming Message Types
This step normalizes Telegram payloads and routes the execution based on whether the user sends text, a document, voice note, or a callback.
- In Map Incoming Context, add fields using these expressions:
chat_id ={{ $json.callback_query?.message.chat.id || $json.message?.chat.id }}
callback_data ={{ $json.callback_query?.data || 'none' }}
message_text ={{ $json.message?.text || 'none' }}
update_type ={{ (() => { if ($json.message?.text) { return 'text'; } else if ($json.callback_query?.data) { return 'callback'; } else if ($json.message?.document) { return 'document'; } else if ($json.message?.voice) { return 'voice' } else { return 'unknown'; } })() }}
file_id ={{ $json.message.document?.file_id }}
file_mime_type ={{ $json.message.document?.mime_type }}
file_caption ={{ $json.message.caption }}
voice_file_id ={{ $json.message.voice.file_id }} - In Route by Input Type, keep the four rules based on
{{ $json.update_type }}to send items totext,document,voice, orcallbackoutputs. - Verify the flow: Telegram Intake Trigger → Map Incoming Context → Route by Input Type.
Step 3: Configure Document Handling and Summarization
When a document is sent, the workflow downloads it, converts binary to data, extracts company information, then prepares a prompt for the agent.
- In Fetch Document File, set Resource to
fileand File ID to{{ $json.file_id }}. - Credential Required: Connect your telegramApi credentials in Fetch Document File.
- In Encode Document Data, set Operation to
binaryToPropery. - In Summarize Document Content, set URL to
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContentand JSON Body to the provided template using{{ $('Fetch Document File').item.binary.data.mimeType }}and{{ $json.data }}. - Credential Required: Connect your googlePalmApi credentials in Summarize Document Content.
- In Compose Document Prompt, set chatInput to
{{ $('Map Incoming Context').item.json.file_caption }} --- Information extracted from document sent by the user --- {{ $json.candidates[0].content.parts[0].text }} --- End for information extracted from document sent by the user ---.
Step 4: Configure Voice Note Transcription
Voice notes are fetched from Telegram, converted to inline audio data, transcribed with Gemini, and then formatted for the agent.
- In Fetch Audio File, set Resource to
fileand File ID to{{ $json.voice_file_id }}. - Credential Required: Connect your telegramApi credentials in Fetch Audio File.
- In Encode Audio Data, set Operation to
binaryToPropery. - In Transcribe Audio Content, keep URL as
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContentand ensure the JSON body includes{{ $json.data }}insideinline_data. - Credential Required: Connect your googlePalmApi credentials in Transcribe Audio Content.
- In Compose Audio Prompt, set chatInput to
{{ $json.candidates[0].content.parts[0].text }}.
Step 5: Set Up the Social Content Agent and AI Tools
The agent orchestrates content drafting and publishing by leveraging Gemini as the LLM plus multiple AI tools for posting, knowledge retrieval, and memory.
- Open Social Content Agent and verify the System Message matches the content manager instruction block in the node.
- Connect Gemini Chat Engine as the language model for Social Content Agent. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine (configured via the agent’s language model connection).
- Connect Gemini Embedding Builder to Lookup Knowledge Records. Credential Required: Connect your googlePalmApi credentials in Gemini Embedding Builder (configured via the agent’s tool connections).
- Ensure Short-Term Memory Buffer uses Session Key
{{ $('Map Incoming Context').item.json.chat_id }}with Session ID Type set tocustomKey, and is connected to Social Content Agent for memory. - Confirm the AI tools are connected to Social Content Agent: Publish X Post, Publish LinkedIn Company Post, Publish LinkedIn Personal Post, Lookup Knowledge Records, and Store Knowledge Tool.
- Credential Required: Connect your twitterOAuth2Api credentials for Publish X Post and linkedInOAuth2Api credentials for both Publish LinkedIn Company Post and Publish LinkedIn Personal Post (managed via the agent’s connected tools).
[YOUR_ID] in the person field with your actual LinkedIn member ID before testing.Step 6: Configure Callback Memory Clearing and Telegram Responses
This step handles callback cleanup, splits long responses, and sends the final message back to Telegram.
- In Callback Condition Check, keep the condition callback_data equals
cmusing{{ $('Map Incoming Context').item.json.callback_data }}. - Confirm the flow: Callback Condition Check → Purge Conversation Memory → Confirm Memory Cleared.
- In Send Callback Error, keep Text as
Invalid callbackand Chat ID as{{ $('Map Incoming Context').item.json.chat_id }}. - In Segment Agent Output, keep the JavaScript splitter to chunk
item.json.outputinto3000-character parts. - In Expand Message Parts, set Field to Split Out to
parts. - In Dispatch Telegram Reply, set Text to
{{ $json.parts || "Error occured, pls try again" }}and Chat ID to{{ $('Map Incoming Context').item.json.chat_id }}. - Credential Required: Connect your telegramApi credentials in Dispatch Telegram Reply, Send Callback Error, and Confirm Memory Cleared.
Step 7: Test & Activate Your Workflow
Run end-to-end tests for text, document, voice, and callback inputs before enabling the workflow in production.
- Click Execute Workflow and send a Telegram text message to confirm Prepare Text Prompt → Social Content Agent → Dispatch Telegram Reply works.
- Send a document to verify the flow Fetch Document File → Encode Document Data → Summarize Document Content → Compose Document Prompt → Social Content Agent.
- Send a voice note to verify Fetch Audio File → Encode Audio Data → Transcribe Audio Content → Compose Audio Prompt → Social Content Agent.
- Test the callback by sending a
cmcallback to confirm Purge Conversation Memory and a response from Confirm Memory Cleared. - When successful, toggle the workflow to Active for live use.
Common Gotchas
- Telegram credentials can expire or the bot can lose permissions. If things break, check your BotFather token and the n8n Telegram credential first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- LinkedIn posting permissions are picky, especially for company pages. If publishing fails, confirm the LinkedIn app scopes and that the connected account is allowed to post for that page.
Frequently Asked Questions
About 45 minutes if you already have the API keys.
No. You will mainly connect accounts and paste API keys into credentials. The only “technical” part is testing each input type once (text, voice, document) so you trust the outputs.
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 Google AI Studio usage costs (usually small per request) and any LinkedIn/X API requirements tied to your account.
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 it’s a common tweak. You can disable the “Publish LinkedIn Company Post” action and keep only “Publish LinkedIn Personal Post,” while leaving the Telegram approval step unchanged. Many teams also customize the AI agent prompt to enforce a length limit, add a call-to-action style they like, or always include 3–5 hashtags.
Most of the time it’s permissions or an expired token. Reconnect the LinkedIn credential in n8n, then confirm the app has the right scopes to publish and that your user can post to the selected company page. If you’re posting frequently, you can also hit rate limits, which shows up as intermittent failures that “fix themselves” later.
If you self-host, it’s mainly limited by your server and your AI/API quotas, not n8n itself.
Often, yes, because this workflow relies on routing (text vs. audio vs. documents), memory, and more complex “agent” behavior that’s awkward (and pricey) in simpler automation tools. n8n is also flexible about where it runs, which matters if you need self-hosting for community nodes or want full control. The big advantage, though, is the approval loop in Telegram combined with long-term memory, so you’re not re-explaining your brand every time. Zapier or Make can still be fine for basic “message in → post out” setups, but they tend to get brittle when you add file handling and multi-step AI. Talk to an automation expert if you’re not sure which fits.
You get the draft in the same place your ideas already live, then you approve and move on. Set it up once, and your “I should post this” moments finally turn into posted content.
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.