DEV Community

Cover image for How To Generate Videos In N8N Workflows Step By Step
Yassine
Yassine

Posted on

How To Generate Videos In N8N Workflows Step By Step

If you’ve been searching for a clear, practical guide on how to generate videos in n8n, you’re in the right place. In this tutorial, you’ll learn—step by step—how to automate video creation using Scrptly’s AI Video-Agent inside an n8n workflow. Whether you’re building UGC ads, educational explainers, or long-form content, this setup will let you scale video production reliably and hands-free.

A peaceful surreal 4k cityscape at dawn showing delicate glowing paths linking floating nodes above a calm river, symbolizing n8n workflows. Soft pastel sky, mirror reflections on water, translucent geometric shapes as automation steps, gentle volumetric light, cinematic wide angle, hyperreal yet serene mood.

Why Scrptly + n8n for video automation

  • Generate long-form AI videos consistently with character and environment continuity.
  • Drive e-commerce ads, product showcases, explainers, and short films from text prompts.
  • Automate production pipelines: schedule prompts, ingest assets, publish videos.
  • Integrate easily with your stack using n8n’s triggers and destinations.

Scrptly is an AI Video Agent that turns your prompts into finished videos—no manual editing. Describe the story, upload optional context images, and Scrptly’s swarm of sub-agents (research, screenplay, narration, scene design, editing) handles the rest. Learn more at https://scrptly.com/

What you’ll need

  • An n8n instance (self-hosted or cloud)
  • A free or paid Scrptly account for your API key: https://scrptly.com/
  • Optional: reference/context images for character or product consistency

Step-by-step: Generate videos in n8n with Scrptly

1) Install the Scrptly node (Community Node)

2) Add credentials

  • In the n8n editor, open Credentials > New Credential
  • Choose Scrptly API
  • Paste your API key from your Scrptly account page (https://scrptly.com/)
  • Save

3) Create a trigger

  • Use Webhook (for on-demand generation), Schedule (for frequent posting), or App triggers (e.g., new product added)
  • Example: A Cron node to publish 3 explainer videos per week.

4) Drop in the Scrptly node and configure

  • Credentials: Select your Scrptly API credential
  • Prompt: Describe the video you want—style, tone, length, aspect ratio, audience, CTA
  • Context Images (optional): URLs or binary images to enforce product/character consistency
  • Approve Up To: Budget limit (tokens) for generation (default 10,000)
  • Wait For Completion: On to block until the final video is ready (or Off to return a task ID immediately)

Prompt template you can copy:

  • Purpose: “Create a 30–45s UGC ad driving clicks to our landing page.”
  • Audience: “Skincare enthusiasts 20–35.”
  • Style: “Handheld, authentic, bright daylight, crisp audio, friendly.”
  • Structure: “Hook (0–3s), Problem (3–10s), Product demo (10–25s), Social proof (25–35s), CTA (35–45s).”
  • Visual notes: “Soft neutral background, tight product shots, on-skin closeups.”
  • Output: “1080x1920 vertical, captions on, subtle music, final duration ~40s.”

5) Add storage/output nodes

  • Save the final video to S3, GCS, or Google Drive
  • Optionally compress/rename files and organize by date or campaign

6) Publish everywhere automatically

  • Push to Slack for approvals
  • Post to social (YouTube Shorts, TikTok, Instagram Reels) via n8n integrations or a custom webhook
  • Email the link to your team or client for review

7) Monitor and iterate

  • Add a Notion or Airtable node to log prompts, context images used, duration of generation, and performance metrics
  • Tweak prompts and “Approve Up To” budget as you learn what converts

8) Add branching for A/B testing

  • Duplicate the Scrptly node with different hooks or CTAs
  • Compare performance downstream and keep the winner

9) Scale with schedules and inputs

  • Feed new product feeds (CSV/Notion) and rotate prompt variations programmatically
  • Use Wait For Completion = Off to queue many videos and poll task status in parallel

Example: UGC ad workflow (30–45s vertical)

  • Trigger: Schedule weekly
  • Scrptly node (Prompt example): “Create a 40-second vertical UGC-style ad reviewing our new vitamin C serum. Tone is friendly and credible. Start with a bold hook about dull skin, show closeup product shots, demo application, include two benefits with quick on-screen captions, and end with a clear CTA to ‘Shop now.’ Keep shots cohesive and consistent. Bright natural light, soft neutral colors, light upbeat music. Add auto-captions and export in 1080x1920.”
  • Context Images: Product packshots and logo to maintain consistency
  • Storage: Upload video to Google Drive > /Marketing/UGC/2025/
  • Distribution: Send a Slack message with the video link + auto-generated caption text

A tranquil 4k landscape with a winding pastel river forming a flowchart through a luminous valley. Each bend hosts a glowing orb labeled with subtle icons webhook, prompt, storage, social. Misty mountains in the background, soft sunrise lighting, hyperreal textures, calm color palette, cinematic composition.

Advanced tips for n8n video automation

  • Ensure consistency with context images: Use the same product photos or character references to keep identity across scenes in long-form videos.
  • Name characters and locations in prompts: “Character: Mira, Location: cozy studio apartment at dusk.” This guides Scrptly’s sub-agents.
  • Control length and format in the prompt: e.g., “Landscape 1920x1080, 2–3 minutes, documentary pacing.”
  • Use Wait For Completion strategically: Leave it off to fire-and-forget lots of tasks; add a follow-up node to check status later.
  • Log everything: Store prompt text, assets, and final URLs in Notion/Airtable for reproducibility and content calendars.

Developer corner: Programmatic video creation

If you need more control, Scrptly provides a Video Development Kit (VDK) and APIs to generate videos with code, plus an MCP interface for agent-to-agent workflows. Explore the platform at https://scrptly.com/

Install the SDK:

npm install scrptly
# or
yarn add scrptly
Enter fullscreen mode Exit fullscreen mode

Initialize your API key:

import Scrptly from 'scrptly';

Scrptly.setApiSettings({
  apiKey: process.env.SCRPTLY_API_KEY, // store securely
});
Enter fullscreen mode Exit fullscreen mode

From there, you can create videos with natural-language prompts via the AI Video-Agent API, or design custom templates with the VDK’s visual editor and code-driven workflows.

Common use cases with prompts you can lift

  • E-commerce product showcase: “60–90s landscape video showing a premium leather bag in daily use. Warm, cinematic light, closeups of stitching, voiceover with benefits, end-screen with price and CTA. Keep character hands consistent across shots.”
  • Explainer mini-doc: “2–3 minute documentary-style video about how glaciers melt faster today. Include simple animated diagrams, calm narration, subtle ambient music, references to credible sources for visuals, captions on.”
  • Social news explainer: “60s portrait video summarizing three tech headlines of the week. Clean lower-thirds, quick cuts, background music low, on-screen bullet points.”
  • Anime short: “90s stylized anime scene of a fox learning to fly at dusk. Consistent character, emotive progression, soft score, wide shots then closeups, pastel palette.”

Why Scrptly instead of generic editors

  • Long-form stability: Character and environment consistency across scenes
  • End-to-end automation: From screenplay to edit to voiceover, handled by specialized sub-agents
  • Flexible integrations: Native n8n node, APIs, MCP server, and VDK for developers
  • Built to scale: Batch generate and distribute across channels programmatically

Ready to build your first automated video workflow? Start with the Scrptly N8N node today: https://github.com/ybouane/n8n-nodes-scrptly and get your API key at https://scrptly.com/


Frequently asked questions

Q: How long does generation take?

A: Depends on complexity and length. For short videos, expect minutes. In n8n, enable Wait For Completion to pause the workflow until the final video is ready.

Q: Can I ensure product/character consistency?

A: Yes—provide context images in the Scrptly node. This anchors identity across scenes, especially for long-form content.

Q: Can developers integrate programmatically?

A: Absolutely. Use the Scrptly API/VDK, the MCP interface for agents, or orchestrate everything via n8n.

Q: Can I run A/B tests?

A: Yes—duplicate Scrptly nodes with different prompts, then route both to identical publishing paths and compare results.


Pro tip: Build a reusable “Video Factory” workflow

  • Inputs: Topic, angle, prompt template, context image URLs, target platform
  • Processing: Scrptly node (generation) + caption generator + brand voice fixer
  • Outputs: Storage + social posting + analytics logging

This lets you create weekly series (e.g., product drops, explainers, mini-docs) at scale with only prompt updates.

Call to action

Some images in this article were generated via AI tools and the article itself was proof-read with AI.

Top comments (0)