All posts
AI Video

How I Cut AI Video Ad Production Time by 50% Using n8n + Sora + Runway

The exact pipeline I built to render and publish 30+ ad variants per week across Meta, TikTok, and YouTube — without hiring an editor or burning out.

May 20, 2026·4 min read·by Olexander Cheberko
Table of contentstap to expand

If you're running performance ads, you know the bottleneck: creative. Algorithms eat variants faster than humans can produce them.

Last quarter I built a pipeline that generates, renders, and publishes 30+ ad variants per week for a single client. Solo. No editor, no agency, no agency margins.

Here's how it works and what to copy.

The actual problem

A standard Meta campaign needs 5–10 fresh creatives per week to avoid creative fatigue. At ~$300/video from a freelance editor, that's $1,500–$3,000/week just on creatives.

For clients with $10K/month ad budgets, creative cost was eating 30%+ of total spend. Something had to change.

The pipeline (4 stages)

Stage 1: Brief → Script (Claude / GPT-5)

Every campaign gets a brief: audience, hook angles, CTAs, visual references. I feed it into an n8n workflow that runs through Claude to generate 3 script variants per angle.

// Inside an n8n Code node
const angles = ["pain-point", "social-proof", "demo-led"];
const briefs = angles.map((angle) => ({
  angle,
  audience: $json.audience,
  product: $json.product,
  cta: $json.cta,
}));
return briefs;

Output: 9 scripts (3 angles × 3 variants). Each script is 90–120 words, structured as hook → problem → solution → CTA.

Stage 2: Script → Video (Sora / Runway / HeyGen)

Different models for different jobs:

  • HeyGen for talking-head spokesperson shots
  • Runway Gen-3 for product b-roll and abstract visuals
  • Sora for narrative shots that need motion

n8n calls each API in parallel based on the shot type encoded in the script. Each video comes back in 60–180 seconds.

Stage 3: Render + Caption (FFmpeg + Whisper)

Raw clips need:

  1. Brand intro (2s)
  2. Auto-captions (Whisper transcription → SRT → burned into video)
  3. CTA card at the end (3s)
  4. Aspect ratio variants (9:16, 1:1, 16:9)

An n8n workflow on a VPS with FFmpeg installed does all four. Each variant takes ~45 seconds to render. Parallel processing handles all 9 scripts × 3 aspect ratios = 27 final videos in ~7 minutes.

Stage 4: Publish (Meta + TikTok + YouTube APIs)

Final n8n step:

  • Upload to Meta Ads Library as new ad sets in the live campaign
  • Push to TikTok Ad Manager as a new Smart+ creative
  • Drop on YouTube as Shorts with the same caption
  • Log every variant + metadata to a Google Sheet for tracking

All 27 variants go live in under 10 minutes.

The numbers (real, last quarter)

Across one client running this pipeline:

MetricBeforeAfter
Variants per week530
Cost per variant$280$14
Time from brief to live5 days2 hours
CTR on best variant1.4%3.2%

Why CTR improved: more variants means the algorithm finds winners faster. Meta's CBO surfaces the best one within 48 hours instead of 5–7 days.

What I'd do differently

What worked

  • Parallel rendering on a VPS. Don't render serially. Spin up 4 FFmpeg processes, monitor with PM2.
  • Aspect ratio at render time, not after. Don't generate 16:9 then crop. Generate at each ratio natively — Sora handles 9:16 fine.
  • Bilingual presenters from day one. Italian, German, Spanish — HeyGen has them. Don't translate later, generate natively.

What didn't

  • Trying to skip the script stage. First version of this pipeline went brief → video directly. Quality was inconsistent. Adding a script stage with explicit hook/problem/solution structure fixed 80% of the bad outputs.
  • Running on a Mac mini. I tried hosting FFmpeg on a Mac mini in my office. It worked, but I-O was a bottleneck. Moved to a Hetzner CPX21 ($8/mo) and rendering time dropped 60%.

Should you build this?

Honest answer: it depends on volume.

  • Under 5 variants/week: Don't bother. Hire a freelance editor on Upwork at $150/video.
  • 5–15 variants/week: Build a manual version with Descript + HeyGen. No automation needed.
  • 15+ variants/week: Build the pipeline. Payback is 2–3 weeks.

What this costs to build

If you want to build this for your own product:

  • n8n self-hosted on a $10 VPS
  • HeyGen Pro: $89/mo
  • Runway Pro: $35/mo
  • Sora API: pay-as-you-go (~$30–150/mo)
  • Total: ~$170/mo + your time

Time to build: I'd estimate 2–3 weeks for someone familiar with n8n and FFmpeg. First version doesn't need to do all four stages — start with stages 2 and 3, add 1 and 4 once it's proven.


Want this built for your stack instead? I do exactly this engagement on a fixed-price basis. Book a discovery call — I'll scope it in 15 minutes and you'll have a quote in 48 hours.

Tags

AI videoSoraRunwayHeyGenn8nautomation

Need something like this built?

Free 15-min discovery call. I'll listen, ask honest questions, and tell you if I can help.