Quick Overview
This workflow listens for a text idea sent to a Telegram bot, uses Google Gemini to generate a Veo 3.1 prompt and platform-specific copy, renders an 8-second vertical video with Veo 3.1, uploads and publishes it to TikTok, Instagram Reels, and YouTube Shorts via PostWire, and logs results to Google Sheets.
How it works
- Triggers when your Telegram bot receives a new message and ignores empty messages or slash commands.
- Replies in Telegram to confirm the render has started.
- Uses Google Gemini to turn the idea into a Veo prompt plus captions/text for TikTok, Instagram, and YouTube (including a YouTube title).
- Requests an upload URL from PostWire, generates an 8-second 9:16 clip with Veo 3.1, uploads the video to PostWire, and finalizes it to get a hosted video URL.
- Sends the generated video back to the Telegram chat as a preview.
- Publishes the video to TikTok, Instagram, and YouTube through PostWire using per-platform text and an idempotency key to avoid duplicate posts on retries.
- Appends a success or failure record to Google Sheets and replies in Telegram with the published links or the required fixes for any platforms that failed.
Setup
- Create a Telegram bot with @BotFather, add the Telegram credentials in n8n, and (optionally) restrict usage to your chat ID in the Telegram trigger.
- Add Google Gemini credentials with billing enabled for both Gemini text generation and Veo 3.1 video generation.
- Create a PostWire account, connect TikTok/Instagram/YouTube, and configure an n8n HTTP Header Auth credential that sends
Authorization: Bearer <your PostWire API key> for the PostWire requests.
- Create/select a Google Sheets spreadsheet and worksheet with columns for date, idea, status, links, and note, then set the document and sheet in both Google Sheets append steps.
- Adjust the target platforms list and Gemini system prompt if you want different networks or different caption/style output.