Quick overview
This workflow turns an article URL sent via Telegram into a rendered vertical video with AI-generated voiceover and karaoke-style subtitles, uploads it to Google Drive, and optionally publishes it to TikTok via the pm3k API.
How it works
- Triggers when a specified Telegram user sends a message containing an article URL and replies to confirm processing has started.
- Downloads the article content as Markdown (with image summaries) using the Jina AI reader endpoint.
- Uses OpenAI to extract the main article, generate a TikTok video plan (title, caption, script, scenes, motions, and article image URLs), and then generates a voiceover audio file.
- Sends the voiceover to OpenAI Whisper to get word-level timestamps and prepares scene timing plus subtitle chunks aligned to the script.
- Runs a local Node.js/FFmpeg render that downloads the scene images, applies pan/zoom motion, burns in karaoke subtitles, and outputs a final MP4.
- Uploads the rendered video to Google Drive, shares it publicly, and prompts the user in Telegram to publish, re-render, or cancel.
- If publishing is approved, fetches TikTok accounts from pm3k, lets the user pick an account in Telegram, creates a TikTok post batch via pm3k, and polls until it succeeds or fails before notifying the user.
Setup
- Connect a Telegram Bot API credential, set the allowed Telegram user ID, and start the workflow so you can send article URLs to the trigger.
- Add an OpenAI API credential with access to chat models, TTS (tts-1-hd), and Whisper (whisper-1) for planning, voiceover generation, and transcription.
- Ensure the n8n host can run
node and ffmpeg and can write to /home/node/.n8n-files/work (or update the paths in the command and file nodes).
- Connect a Google Drive OAuth2 credential and set the target Drive/folder ID where rendered videos should be uploaded.
- Add an HTTP Bearer Auth credential for the pm3k API (pm3k.org) so the workflow can list TikTok accounts and publish videos.