Quick overview
This workflow turns Telegram messages into Renderster video processing jobs (auto edit, clips, dubbing, or transcripts) using OpenAI to interpret the request, then delivers the results back to Telegram and logs each job to Google Sheets.
How it works
- Triggers when the Telegram bot receives a message and extracts the chat ID, text/caption, file ID, and any URL.
- Checks the chat ID against an allowlist and replies with instructions to add the chat ID if the user is not authorized.
- Uses OpenAI (gpt-4o-mini) to interpret the message into a structured action (auto edit, clips, dub, transcript, or help) and a short reply.
- Sends a help message in Telegram if the request is help or no video/link is provided, otherwise builds the Renderster job options from the parsed request.
- Starts a Renderster /media job by either downloading the attached video from Telegram and uploading it, or sending the provided link, and confirms the job start in Telegram.
- Waits for Renderster to call back via webhook (with periodic status checks), then fetches the final status and result.
- Sends finished videos back to Telegram (uploading files up to Telegram’s limit, otherwise sending a light copy or link), logs the job details to Google Sheets, and posts an error message if the job fails.
Setup
- Create a Renderster API key and add an n8n HTTP Header Auth credential with header name
X-API-Key and your key as the value.
- Create a Telegram bot with @BotFather, add the Telegram credentials in n8n, and send a message to the bot to retrieve your chat ID.
- Add an OpenAI credential (gpt-4o-mini) for request interpretation.
- Add a Google Sheets OAuth2 credential, select the target spreadsheet and sheet in the Google Sheets node, and ensure it has columns for Date, Chat, Request, Type, Credits, and Result.
- Populate
allowed_chat_ids in the Settings node (comma-separated) and adjust defaults like edit style, clip count, dubbing language, captions, and music as needed.
Requirements
- A Renderster account and API key (clips work on the Free plan; auto edit and dub need a paid plan, with a 7-day free trial)
- A Telegram bot token from @BotFather
- An OpenAI API key (gpt-4o-mini)
- A Google Sheets account for the job log
Customization
- Change the default edit style, clip count, dub language, captions and music in the Settings node
- Teach the bot new commands or phrases by editing the prompt of Understand the request
- Allow more people by adding their chat IDs to allowed_chat_ids
Additional info
Video tutorial: https://www.youtube.com/watch?v=lijTDCFuPoA . Self-hosted n8n: set WEBHOOK_URL to your public address so Renderster can resume the Wait node at once (otherwise it checks every 10 minutes).