🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

YouTube + Gmail: viral-ready shorts without editing

Lisa Granqvist Partner Workflow Automation Expert

Turning one long YouTube video into a week of Shorts sounds simple. Then you open your editor, hunt for timestamps, crop to 9:16, fix pacing, style subtitles, export, re-export, and still wonder if you picked the right moments.

This YouTube shorts automation hits content creators first, honestly. But social media managers and marketing leads feel it too, because consistency dies when editing turns into an all-day project.

This n8n workflow takes a single YouTube link, finds the best segments with AI, generates vertical clips with burned-in subtitles, and emails you in Gmail when your batch is ready. You’ll see how it works, what you need, and where teams usually tweak it.

The Problem: Shorts Take Forever (Even When You “Know What to Clip”)

Repurposing long-form into short-form is supposed to be leverage. In reality, it’s a time trap. You watch the full video again, mark “good parts,” export a few tests, realize the crop cuts off faces, then lose another hour tweaking subtitles so they’re readable on a phone. Do that across multiple episodes or client channels and you’re buried. Worse, the busywork crowds out the part that actually grows accounts: publishing regularly and learning what hooks your audience.

The friction compounds. It’s not one big task, it’s a dozen small ones that keep interrupting your day.

  • Finding “viral moments” is guesswork, which means you often clip the safe parts instead of the sticky parts.
  • Vertical cropping and trimming takes multiple passes, especially when speakers move or the framing changes.
  • Subtitles eat time because you’re adjusting size, contrast, line breaks, and timing by hand.
  • Batch exporting ten clips can take most of an afternoon, then you still need to check which files actually finished.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: YouTube + Gmail: viral-ready shorts without editing

The Solution: One Link In, A Batch of Vertical Clips Out

You submit a YouTube URL through a simple intake form (or run it manually). The workflow downloads the video in high quality and pulls the subtitles or transcript using yt-dlp. Next, it cleans and chunks the transcript so Gemini can analyze it in manageable batches, then it asks Gemini to score potential segments based on hook strength, pacing, emotional peaks, and engagement triggers. Once the best moments are picked, the workflow cuts the top candidates with FFmpeg, then runs each clip through an editing subworkflow that handles vertical framing and subtitle styling. When everything is finished, your finalized clips land in a local /data/clips/ folder and Gmail sends you a “ready” message so you’re not babysitting exports.

It starts with a YouTube link and ends with about 10 social-ready vertical clips. In between, AI chooses the moments, FFmpeg does the cutting and formatting, and n8n orchestrates the whole pipeline so it runs in a predictable order without overloading your machine.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you turn one 30–60 minute YouTube video into 10 Shorts each week. Manually, even “fast” editing is often about 30 minutes per clip (finding the moment, cropping, subtitles, export), which is roughly 5 hours of work for the batch. With this workflow, you spend about 5 minutes pasting the URL and submitting the form, then you wait for processing while it cuts and renders in sequence. You get a Gmail note when everything’s ready, and your whole batch is sitting in /data/clips/.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • FFmpeg + FFprobe for clipping, cropping, subtitle burn-in
  • yt-dlp to download video and transcripts
  • Google Gemini API key (get it from Google AI Studio)
  • Gmail OAuth2 credentials (create/connect inside n8n credentials)

Skill level: Intermediate. You’ll import the workflow, connect credentials, and install command-line tools on your n8n host.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

You submit the YouTube URL. The workflow starts from a form intake trigger (or a manual launch) and captures the link you want to repurpose.

The video and transcript get pulled down. yt-dlp downloads the video file and retrieves subtitles or an auto-generated transcript, then n8n reads and normalizes that text so it’s usable.

Gemini finds the moments worth clipping. The transcript is split into chunks, Gemini scores candidate segments, and the workflow merges everything into a ranked list so only the best clips move forward.

Clips are cut and edited in a controlled batch. FFmpeg extracts each segment by timestamp, then a subworkflow runs “editing operations” like smart 9:16 framing and subtitle styling, with wait nodes to prevent your server from choking.

Files land in a folder and Gmail tells you it’s done. Finished clip paths are collected, saved to /data/clips/, and you get an email notification so you can publish right away.

You can easily modify how many clips get produced and how strict scoring is based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual and Form Triggers

Set up both entry points so you can launch the workflow manually or via a form submission. These triggers feed the same download and transcript branches in parallel.

  1. Open Manual Launch Trigger and keep it as-is for on-demand testing.
  2. Open Form Intake Trigger and set Form Title to Clipping.
  3. In Form Intake Trigger, add required fields for project name and yt URL.
  4. Connect the workflow so Manual Launch Trigger outputs to both Download Video via YT-DLP and Retrieve Transcript via YT-DLP in parallel.
  5. Connect the workflow so Form Intake Trigger outputs to both Download Video via YT-DLP and Retrieve Transcript via YT-DLP in parallel.

Tip: Use Form Intake Trigger for production, and Manual Launch Trigger for quick tests and debugging.

Step 2: Connect the Video Download and Transcript Extraction Chain

This step downloads the video file and auto-generated subtitles, then parses and normalizes the transcript for AI analysis.

  1. In Download Video via YT-DLP, set Command to =yt-dlp -o "/data/clips/%(title)s.%(ext)s" "{{ $json["yt URL"] }}".
  2. In Retrieve Transcript via YT-DLP, set Command to =yt-dlp --write-auto-sub --sub-lang "en.*,live" --skip-download {{ $json["yt URL"] }} -o "/data/%(title)s".
  3. Keep Locate Downloaded Video and Parse Transcript Path as-is to extract the output paths from YT-DLP logs.
  4. In Read Subtitle File, set File Selector to ={{ $json.downloadedFile }} to load the subtitle file.
  5. Ensure Extract Text Payload uses Operation text, then connect into Normalize Transcript Data and Chunk Caption Batches.

⚠️ Common Pitfall: YT-DLP must be installed and accessible in your n8n runtime; otherwise Download Video via YT-DLP and Retrieve Transcript via YT-DLP will fail.

Step 3: Set Up AI Segment Detection and Scoring

This block uses Gemini to detect viral clip candidates from caption chunks, then selects the highest scored clips.

  1. Open Detect Viral Segments and keep JSON Output enabled.
  2. Credential Required: Connect your googlePalmApi credentials in Detect Viral Segments.
  3. Confirm Detect Viral Segments receives transcript chunks from Chunk Caption Batches.
  4. Keep Select Top Scored Clips as-is to parse and sort the AI output, preserving only the top 10 clips.

Step 4: Merge Video Metadata with Clip Candidates

This step combines the video file path with AI-selected clip ranges to build actionable clip tasks.

  1. Connect Locate Downloaded Video into Merge Video and Clips (input 1).
  2. Connect Select Top Scored Clips into Merge Video and Clips (input 2).
  3. Ensure Merge Video and Clips outputs to Build Actionable Clip Items to produce start/end + path items.
  4. Confirm Build Actionable Clip Items outputs into Iterate Clip Tasks for batch processing.

Step 5: Configure Clip Extraction and Analysis Pipeline

This sequence extracts clips, converts files for AI analysis, and generates edit operations. Multiple code and executeCommand nodes handle file parsing and FFmpeg tasks—keep them grouped and unchanged unless you know the pipeline requirements.

  1. In Basic Clip Extraction, keep the Command set to =ffmpeg -ss {{$json.start}} -to {{$json.end}} \ -i "{{$json.videoPath}}" \ -c:v libx264 -preset fast -crf 22 \ -c:a aac -b:a 128k \ "/data/clips/{{ $json.start }}_{{ $json.end }}.mp4".
  2. Keep Collect Clip Output Paths connected to Iterate Processed Clips to feed post-processing.
  3. Confirm the file chain Load Clip FilesExtract Clip Base64Convert Base64 to BinaryAnalyze Full Clip Video.
  4. Credential Required: Connect your googlePalmApi credentials in Analyze Full Clip Video.
  5. Keep Generate Edit OperationsFilter Enabled OperationsAggregate Clip Results unchanged to build the task list.

⚠️ Common Pitfall: The workflow expects FFmpeg and FFprobe to be installed for Basic Clip Extraction, Run Clip Command, Probe Video Dimensions, and Render Subtitle Burn.

Step 6: Configure the Editing Sub-Workflow and Subtitle Branch

This workflow hands aggregated edit tasks into a sub-workflow and runs conditional subtitle rendering with waits to reduce system load.

  1. In Run Sub-Workflow (Configure Required), select a target workflow in Workflow (currently empty).
  2. Set Workflow Inputs to pass data using ={{ $json.data }}.
  3. Ensure Editing Workflow Entry feeds Split Input Array, then into Iterate Edit Steps.
  4. Keep Check Subtitle Step branching into Probe Video Dimensions and Run Clip Command based on ={{ $json.step }} equals subtitles.
  5. Leave Pause For System Load and Hold After Subtitle Burn at Amount 60 to prevent overload.

⚠️ Common Pitfall: Run Sub-Workflow (Configure Required) will fail until you select a target workflow and save it.

Step 7: Configure Output Notifications

Once clips finish processing, the workflow emails a completion notice.

  1. Open Dispatch Email Notice and set Send To to [YOUR_EMAIL].
  2. Set Subject to cliping done and Message to clips are ready!.
  3. Credential Required: Connect your gmailOAuth2 credentials in Dispatch Email Notice.

Step 8: Test and Activate Your Workflow

Run an end-to-end test to verify downloads, AI outputs, FFmpeg processing, and notification delivery before enabling the workflow.

  1. Click Execute Workflow and test with Manual Launch Trigger using a valid yt URL in the input data.
  2. Verify that Download Video via YT-DLP and Retrieve Transcript via YT-DLP run in parallel and output file paths.
  3. Check that Detect Viral Segments and Analyze Full Clip Video return valid JSON and that Generate Edit Operations produces enabled tasks.
  4. Confirm clips are generated and that Dispatch Email Notice sends the completion email.
  5. When everything succeeds, toggle the workflow Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Gmail OAuth2 credentials can expire or need the right scopes. If messages stop sending, check the credential status in n8n and re-authenticate the connected Google account.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Gemini prompts are powerful but sensitive. If your clips feel “meh,” update the prompt in the viral segment detection node to match your content style (tutorials, podcasts, webinars), or you will be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this YouTube shorts automation automation?

About an hour if your server is ready for FFmpeg and yt-dlp.

Do I need coding skills to automate YouTube shorts automation?

No coding required for the basic setup. You will mostly be connecting credentials and pasting in your subworkflow ID.

Is n8n free to use for this YouTube shorts automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API costs (usually low for a few videos, but it depends on transcript length and how many clips you generate).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this YouTube shorts automation workflow for generating 5 clips instead of 10?

Yes. In the “Select Top Scored Clips” code step, the workflow uses a slice to take the top 10 candidates, and you can change that to 5. Common customizations include increasing the minimum score threshold, changing the subtitle font and outline settings, and adjusting the wait times so your server stays stable.

Why is my Gmail connection failing in this workflow?

Usually it’s expired OAuth consent or the wrong Google account is connected. Reconnect Gmail in n8n credentials, then confirm the “Send a message” node is using that credential. If you’re self-hosting behind a firewall, make sure your server can reach Google APIs. Also check that you replaced the default recipient email with your own.

How many clips can this YouTube shorts automation automation handle?

A lot, but it’s limited by your server more than n8n. On n8n Cloud Starter you’re capped by monthly executions, while self-hosting has no execution limit (it depends on CPU, RAM, and disk). Practically, most teams run batches overnight, because 10 clips with subtitle burn-in can take a while on modest hardware.

Is this YouTube shorts automation automation better than using Zapier or Make?

For this workflow, yes, because Zapier and Make can’t realistically run server-side tools like FFmpeg and yt-dlp in the same way. This pipeline needs command execution, file handling, and a subworkflow that loops through edits, which is exactly where n8n shines. If your goal is only “send me an email when a YouTube video is posted,” then Zapier is simpler. But for real clip production, you want the control and the ability to self-host. If you’re unsure, Talk to an automation expert and you’ll get a straight answer for your setup.

Set it up once, then let your backlog of long videos turn into publishable Shorts while you work on the next idea. The workflow handles the repetitive parts so you can stay consistent without living in an editor.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal