Automate the creation of viral short clips from YouTube videos using this powerful n8n workflow. It leverages yt-dlp, FFmpeg, and Google Gemini AI to analyze transcripts, identify peak moments, perform 9:16 cropping, and burn dynamic subtitles automatically. Use this n8n template for fast content creation.
Download this n8n workflow template and start using it instantly.
The primary challenge this solution addresses is the labor-intensive process of manually reviewing long-form video content to find short, high-engagement clips, followed by the time-consuming process of editing (cropping, trimming, subtitling). This sophisticated n8n workflow completely automates that process. By integrating system-level tools like yt-dlp for downloading and FFmpeg for high-performance editing with the analytical power of the Gemini AI n8n node, this n8n workflow analyzes the video transcript to score and select the best moments. The result is a fully edited, vertical (9:16 aspect ratio) clip set, ready for immediate upload, maximizing content output efficiency. This specialized n8n template is designed for self-hosted environments.
On form submission n8n trigger where the user inputs the YouTube URL. Parallel Execute Command n8n node steps use yt-dlp to download both the video file and its corresponding SRT subtitle file.Code n8n node steps extract the file paths, read the SRT content from disk, format it into clean, timestamped segments, and chunk the data for efficient AI processing.viral clips identification Google Gemini n8n node analyzes the transcript chunks, using AI scoring to determine the top 10 most viral-worthy segments, returning precise start and end times for each.Execute Command n8n node uses FFmpeg to perform a quick initial clip extraction based on the AI's timestamps.Analyze the actual whole video Google Gemini n8n node. This AI is prompted with a strict JSON schema to generate a professional editing plan, including specific crop coordinates (for 9:16 vertical video) and detailed subtitle instructions.extract all actionable operations Code n8n node parses the complex AI editing JSON and converts it into a sequential list of optimized FFmpeg commands (e.g., trimcrop, createsrt, subtitles).Execute Command n8n node steps dynamically calculate the appropriate font size and placement relative to the video dimensions using ffprobe and then execute the final ffmpeg command.Gmail n8n node sends a notification confirming that the high-quality clips are available on the server.yt-dlp and ffmpeg are installed and available in the execution environment of your n8n setup.viral clips identification and Analyze the actual whole video n8n node instances.Send a message n8n node for notifications./data/clips/ path references in the Execute Command n8n node parameters (for yt-dlp and ffmpeg) to match your storage configuration.On form submission n8n trigger, and submit the YouTube link to begin the automated clipping process. On form submission (n8n trigger): The primary entry point, collecting the necessary YouTube URL and video title via a user form.
video download with yt-dlp / get transcript from yt-dlp (Execute Command n8n node): Utilizes external yt-dlp commands to fetch video and transcript data, which is essential for the AI analysis in the subsequent steps of this n8n workflow.
viral clips identification (Google Gemini n8n node): Analyzes the segmented transcript to find and score potential viral moments, providing precise timestamps (HH:MM:SS.mmm format) for targeted clipping.
filter out top clips according to score (Code n8n node): Aggregates results from multiple AI analysis chunks, sorts them by the calculated 'score', and retains the top candidates (default: 10 clips).
Analyze the actual whole video (Google Gemini n8n node): Receives the initial clip and performs a detailed analysis to generate a rigid, actionable JSON object containing professional editing instructions (9:16 crop coordinates, trimming, and micro-chunked subtitle structure).
extract all actionable operations (Code n8n node): Converts the complex editing instructions from the AI into a linear, sequential pipeline of explicit FFmpeg shell commands, preparing the data for the final Execute Command n8n node steps.
Execute operation on the clip (Execute Command n8n node): The core editing engine; executes the generated FFmpeg commands to apply trimming, cropping, and subtitle burning to create the final, polished short-form video.
Gmail (n8n node): Provides final communication, alerting the user when the automated clipping process is successfully completed.
Use this powerful n8n workflow to automate converting university term date spreadsheets (XLSX) into shareable ICS calendar files using AI data extraction and the Cloudflare Markdown Conversion service.

Learn how to extract the domain name from any email address using a custom JavaScript n8n node. Download this useful n8n workflow template for data cleanup.

Automate content creation and optimize posting strategy using this advanced n8n workflow. It extracts trends from Twitter, Reddit, and Google Trends, uses OpenAI for sentiment analysis and scoring, and automatically generates tailored posts for LinkedIn, Instagram, and Twitter.

Use this powerful n8n workflow to automatically extract links from Gmail, scrape data from the linked web page using HTML selectors, process the information, and save it to Google Sheets.

Use this robust n8n workflow to automatically crawl and extract all URLs from complex sitemaps and nested sitemap indexes, crucial for deep SEO analysis and auditing.

Ai & Data science engineer | Automation expert who build's systems that deliver a ROI







































