Telegram + OpenAI: Reel scripts ready to film fast
Reel ideas show up at the worst times. You jot them down in Notes, DM yourself, lose the thread, then stare at a blank page when it’s finally time to film.
Social media managers feel it when they need five new concepts before lunch. Content creators feel it when momentum disappears after one missed post. And if you run a small brand, this Telegram OpenAI scripts automation stops “idea capture” from turning into a weekly guilt ritual.
This workflow lets you send a text or voice note to Telegram and get back hooks, a full 30–60 second Reel script, a caption, and visual direction. You’ll also learn how to log the best outputs into Google Sheets so you build a reusable content bank.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Telegram + OpenAI: Reel scripts ready to film fast
flowchart LR
subgraph sg0["Start: Receive Message on 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/>Start: Receive Message on Te.."]
n1@{ icon: "mdi:brain", form: "rounded", label: "AI Model: GPT-4o", pos: "b", h: 48 }
n2@{ icon: "mdi:memory", form: "rounded", label: "Memory for Chat Context", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Optional: Log Ideas to Googl..", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Error Message", pos: "b", h: 48 }
n5@{ icon: "mdi:robot", form: "rounded", label: "Generate Reels Scenario with..", pos: "b", h: 48 }
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/telegram.svg' width='40' height='40' /></div><br/>Send Scenario to Telegram"]
n7@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route by Input Type", pos: "b", h: 48 }
n8@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set User Input", 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 Error Message to Telegram"]
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/telegram.svg' width='40' height='40' /></div><br/>Get Voice Message"]
n11@{ icon: "mdi:robot", form: "rounded", label: "Transcribe Voice to Text", pos: "b", h: 48 }
n8 --> n5
n1 -.-> n5
n10 --> n11
n4 --> n9
n7 --> n10
n7 --> n8
n7 --> n4
n2 -.-> n5
n11 --> n5
n5 --> n6
n0 --> n7
n3 -.-> n5
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 n5,n11 ai
class n1 aiModel
class n2 ai
class n7 decision
class n3 database
class n3 disabled
classDef customIcon fill:none,stroke:none
class n0,n6,n9,n10 customIcon
Why This Matters: Turning raw ideas into filmable scripts
The hard part of Reels usually isn’t filming. It’s getting from a messy thought (“something about saving time…”) to a tight hook, a clear structure, and visuals you can actually shoot today. When you do it manually, you bounce between notes, prompts, rewrites, and half-finished captions. Then you second-guess everything. By the time you have something usable, the idea is cold, your energy is gone, and you still don’t have a repeatable system for tomorrow’s post.
It adds up fast. Here’s where it breaks down in real life.
- You waste about 30 minutes per idea just trying to find a “good” opening line that stops the scroll.
- Voice-note ideas are the easiest to capture, but they often die because transcribing and cleaning them up is annoying.
- Captions end up repeating the video, which weakens engagement and makes the post feel flat.
- Without a content bank, you keep reinventing the wheel and you can’t scale beyond your best week.
What You’ll Build: A Telegram-to-Reel script generator
This workflow turns Telegram into your “always available” creative intake. You message your bot with a rough idea (text or voice), and the automation routes it correctly. Text goes straight into an AI content agent. Voice notes get fetched from Telegram, transcribed by OpenAI, and then treated like text input. From there, OpenAI generates three hook options, a complete Reel script (hook, subtitle, body, CTA), a caption that supports the video instead of copying it, and a specific visual concept with direction you can follow while filming. Finally, the result is posted back into the same Telegram chat so it’s ready when you are.
If you enable the optional Google Sheets step, every finished scenario can be logged automatically. That’s how this becomes a system: your best ideas stop disappearing, and your library grows quietly in the background.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you want four Reels planned for the week. Manually, a realistic pace is about 45 minutes per Reel to brainstorm hooks, outline the talking points, write a caption, and think through visuals, so that’s roughly 3 hours. With this workflow, you can drop four quick Telegram messages (or voice notes) in about 10 minutes total, then wait a few minutes for responses. You still choose what to film, but you get the “blank page” part out of the way.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Telegram to collect ideas via text or voice.
- OpenAI for transcription and script generation.
- OpenAI API key (get it from your OpenAI API dashboard).
Skill level: Beginner. You’ll mostly connect accounts, paste API keys, and test a few example messages.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A Telegram message kicks things off. The workflow listens for new messages sent to your Telegram bot, which means you can capture ideas from your phone in seconds.
The input gets routed by type. If it’s text, n8n maps your message into a clean “idea” field. If it’s a voice note, the workflow fetches the audio file and sends it to OpenAI for transcription, so you end up with text either way.
OpenAI turns that text into a Reel scenario. A memory buffer keeps conversational context, which helps when you refine an idea over a few messages. Then the content agent generates hook variants, a script structure, a caption, and visual concepts that are actually actionable.
The finished output comes back to Telegram (and optionally Sheets). You get the full scenario in your chat so you can copy it into your filming notes. If Google Sheets logging is enabled, the workflow also writes a new row so your best concepts don’t get buried in old chats.
You can easily modify the prompt and formatting to match your brand voice, or switch the logging from Google Sheets to another tool 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 workflow to listen for incoming Telegram messages that will start the scenario generation.
- Add and open Telegram Message Trigger.
- Credential Required: Connect your telegramApi credentials.
- Set Updates to
message.
Step 2: Route Text vs Voice Input
Route messages to the correct path depending on whether a text message or a voice note was received.
- Open Route Input Type and review the three outputs: Audio, Text, and Error.
- Confirm the Audio condition uses
{{ $json.message.voice.file_id }}with exists. - Confirm the Text condition uses
{{ $json.message.text || "" }}with exists. - Leave the Error output as a fallback path for invalid input.
Route Input Type outputs to Fetch Voice File, Map User Text, and Define Error Text based on the message type.
Step 3: Map Text and Transcribe Voice Input
Normalize the incoming content so it can be sent to the AI generator regardless of whether it came from text or audio.
- In Map User Text, set the text value to
{{ $json.message.text }}. - In Fetch Voice File, set Resource to
fileand File ID to{{ $json.message.voice.file_id }}. - Credential Required: Connect your telegramApi credentials in Fetch Voice File.
- In Transcribe Audio to Text, set Resource to
audioand Operation totranscribe. - Credential Required: Connect your openAiApi credentials in Transcribe Audio to Text.
The audio path runs Fetch Voice File → Transcribe Audio to Text → Create Reel Scenario, while the text path runs Map User Text → Create Reel Scenario.
Step 4: Set Up AI Scenario Generation
Configure the AI agent, memory, and language model that generate the Reel scenario from user input.
- Open Create Reel Scenario and set Text to
{{ $json.text }}. - In Create Reel Scenario, keep the System Message as provided to control tone and output format.
- Open OpenAI Chat Model and set Model to
gpt-4o. - Credential Required: Connect your openAiApi credentials in OpenAI Chat Model.
- Open Chat Context Buffer and set Session Key to
{{ $('Telegram Message Trigger').item.json.message.chat.id }}. - Set Context Window Length to
10in Chat Context Buffer.
Chat Context Buffer is an AI memory sub-node. Add credentials to the parent nodes (e.g., OpenAI Chat Model), not to the memory itself.
Optional: Log to Sheets is a disabled AI tool node. If you enable it, Credential Required: Connect your googleSheetsOAuth2Api credentials and set Document ID and Sheet Name before running.
Step 5: Configure Output to Telegram
Send the generated scenario back to the user and prepare an error message for fallback cases.
- Open Post Scenario to Telegram and set Text to
{{ $json.output }}. - Set Chat ID to
{{ $('Telegram Message Trigger').item.json.message.chat.id }}in Post Scenario to Telegram. - Credential Required: Connect your telegramApi credentials in Post Scenario to Telegram.
- Open Define Error Text and set Error to
An error has occurred. - Open Post Error to Telegram and set Text to
{{ $json.output }}and Chat ID to{{ $('Telegram Message Trigger').item.json.message.chat.id }}. - Credential Required: Connect your telegramApi credentials in Post Error to Telegram.
Define Error Text → Post Error to Telegram handles unexpected input from Route Input Type.
Step 6: Test and Activate Your Workflow
Validate the full flow with both text and voice messages, then enable the workflow for production use.
- Click Execute Workflow and send a Telegram text message to the bot to trigger Telegram Message Trigger.
- Verify that the text path runs Map User Text → Create Reel Scenario → Post Scenario to Telegram and returns a formatted script.
- Send a Telegram voice note and verify the audio path runs Fetch Voice File → Transcribe Audio to Text → Create Reel Scenario → Post Scenario to Telegram.
- If an error is sent, confirm Define Error Text → Post Error to Telegram responds correctly.
- When everything works, toggle the workflow to Active to run continuously.
Troubleshooting Tips
- Telegram credentials can fail if your bot token is wrong or privacy settings block messages. Check BotFather settings (especially /setprivacy) and confirm the token inside your Telegram Trigger and Telegram send nodes.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 30 minutes if your Telegram bot and OpenAI key are ready.
No. You’ll connect Telegram and OpenAI, then paste in credentials. Most of the work is testing with a few real messages.
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 script depending on the model and how long your prompts are.
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 probably should. The simplest change is updating the “Create Reel Scenario” agent instructions so it writes in your tone, includes your offer, and uses your preferred CTA style. You can also swap the Google Sheets logging step for Airtable/Notion, or add a second Telegram message that sends only the hooks for quick scanning. If you want separate outputs for different clients, add a routing rule based on a keyword at the start of the message (like “CLIENT: ACME”).
Usually it’s the bot token or bot privacy settings. Regenerate the token in BotFather if you’re not sure, then update every Telegram node in n8n that uses credentials. Also check /setprivacy in BotFather; if your bot can’t read messages, the trigger won’t fire. Finally, confirm you’re messaging the bot (not a personal account) and that the workflow is activated.
On a typical n8n Cloud plan, it can comfortably handle dozens of ideas per day for a small team, and self-hosting can go higher depending on your server. The practical limit is usually OpenAI rate limits and how many concurrent voice transcriptions you run.
Often, yes. n8n is better when you want branching logic (text vs voice), memory/context, and optional logging without paying per tiny step, which adds up fast in other tools. It also gives you a self-hosted path if you outgrow monthly execution limits. Zapier or Make can still be fine if you only want “Telegram message in, OpenAI message out” with no transcription and no content bank. If you’re torn, Talk to an automation expert and we’ll help you pick the simplest setup that won’t box you in later.
Once this is running, your best ideas stop leaking away into screenshots and half-notes. The workflow handles the messy middle so you can focus on filming and publishing.
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.