Quick overview
This workflow takes a YouTube URL, pulls the video transcript (or falls back to the title and description), uses Google Gemini to generate an 8-slide LinkedIn carousel and caption, validates and improves the outputs, then delivers the result via Telegram and email while logging each run to Google Sheets.
How it works
- Starts when you manually run the workflow and provide a YouTube video URL.
- Extracts the video ID and requests the transcript from Supadata, falling back to YouTube Data API video title and description if no transcript is found.
- Sends the source text to Google Gemini to generate an 8-slide LinkedIn carousel as a JSON array.
- Validates the carousel JSON and, if it is malformed, asks Google Gemini to repair it and retries validation.
- Uses Google Gemini to write a LinkedIn caption with hashtags and then rates/revises it until the virality score is 8 or higher.
- Sends the final caption and slide-by-slide carousel copy to Telegram and email, generates a cover image via Pollinations and posts it to Telegram, and appends run details to a Google Sheets tracking sheet.
Setup
- Add credentials for Supadata (HTTP Header Auth with header name
x-api-key), YouTube Data API, and Google Gemini.
- Create a Telegram bot, add your Telegram credentials, and replace the hard-coded chat ID in both Telegram send steps.
- Configure SMTP credentials for the email step and set the recipient address.
- Connect Google Sheets credentials, replace
YOUR_GOOGLE_SHEET_ID, and ensure the Carousels sheet exists with columns for Date, Video ID, Slide Count, Virality Score, and Status.
- Replace the placeholder
VIDEO_ID_HERE URL value with the YouTube link you want to process (or adapt it to accept input dynamically).