Skip to main content

Command Palette

Search for a command to run...

How To Generate AI Videos In N8N Workflows

Published
6 min read
How To Generate AI Videos In N8N Workflows

If you’ve been looking for a reliable way to generate AI videos inside your N8N workflows—think automated UGC ads, product explainers, or even short films—this guide will walk you through a complete setup using Scrptly, an AI Video Agent built for long-form, consistent video generation.

Scrptly turns a single prompt (plus optional reference images) into a fully edited video—characters, scenes, narration, and cuts included. Better yet, Scrptly has a dedicated N8N node, so you can orchestrate end-to-end video automation without leaving your favorite workflow tool.

A 4k peaceful surreal landscape showing a river branching into glowing channels that connect minimalist floating islands, each island symbolizing a workflow step like "prompt", "narration", "editing", and "publish"; soft dusk lighting; glass-like surfaces; delicate particle trails linking nodes; tranquil cinematic tone; hyperreal, highly detailed, wide aspect ratio.

Why Scrptly for N8N Video Automation?

  • Built for long-form, consistent scenes: Maintain character and environment continuity across minutes, not seconds.
  • Prompt-first control: Describe the story, style, orientation, pacing, and length in natural language.
  • Context image support: Upload brand/product shots to achieve on-model visuals throughout the video.
  • Fully autonomous: Research, screenplay, scene generation, narration, and editing are handled—no manual stitching.
  • Developer friendly: Use the Scrptly API and MCP for agentic workflows, or the N8N node for no-code automation.

What You’ll Build

By the end, you’ll have an N8N workflow that:

  • Accepts a text prompt (and optional image URLs) via Webhook or Scheduler
  • Sends it to Scrptly
  • Waits for a finished video (or retrieves it later if you prefer async)
  • Delivers the output to storage, email, or social publishing tools

Prerequisites

  • An N8N instance (self-hosted or cloud)
  • A Scrptly account and API key: sign up at https://scrptly.com/
  • Optional: image URLs for reference/consistency (product photos, logos, character snapshots)

Step 1 — Install the Scrptly Community Node

  1. In N8N, go to Settings > Community Nodes > Install New.
  2. Search for n8n-nodes-scrptly and click Install.
  3. You can review the source and docs here: Scrptly N8N Node on GitHub

Step 2 — Add Scrptly Credentials

  1. In the N8N editor, open the Credentials tab.
  2. Click New Credential and choose “Scrptly API”.
  3. Paste your Scrptly API key (get it from your Scrptly account page) and save.

Step 3 — Build Your First Workflow

We’ll create a simple automation that receives a prompt, generates a video, and returns a URL.

1) Add a Trigger

  • Option A: Webhook Trigger (POST JSON from your app or a form)
  • Option B: Schedule Trigger (run daily/weekly to batch-generate content)

2) Add the Scrptly Node

  • Choose your Scrptly credentials.
  • Prompt: Write a detailed description of what you want. Example:
    • “Create a 30–45s UGC-style vertical video of someone unboxing our vegan leather tote. Soft natural lighting, warm cozy vibe, gentle ASMR-like pacing. Include a quick overlay with benefits: lightweight, water-resistant, ethically made.”
  • Context Images (optional): Add one or more URLs of reference images for product or brand consistency.
  • Approve Up To (budget): Set the max token budget for generation. The default is 10,000.
  • Wait For Completion: On (default) to pause the workflow until the final video is ready. If you turn it off, the node returns a task ID immediately so you can poll later.

3) Handle the Output

  • The node returns metadata with a link to the finished video.
  • Add nodes to store or distribute the video (e.g., upload to cloud storage, email the link, send to a CMS, or trigger social sharing).

Example Minimal Workflow (Webhook → Scrptly → Respond)

  • Webhook (POST): expects a JSON body like:
    {
    "prompt": "Create a 20s product reel for our smartwatch in underwater conditions, macro close-ups, shimmering light, cinematic sound design.",
    "contextImages": [
      "https://example.com/images/smartwatch-front.jpg",
      "https://example.com/images/smartwatch-underwater.jpg"
    ]
    }
    
  • Scrptly Node: map prompt and contextImages from the incoming data.
  • Respond to Webhook: return the video URL from the Scrptly node’s output.

Proven Prompt Patterns (Copy/Paste)

  • Ecommerce/UGC (Vertical): “Make a 30s vertical UGC ad of a real person unboxing our skincare bundle in a sunlit bathroom. Natural tone, soft soundtrack, quick captions for benefits: ‘gentle on sensitive skin’, ‘dermatologist-tested’, ‘visible glow in 7 days’. End with a simple CTA card.”

  • Educational Explainer: “Produce a 60–90s animated explainer about how whales communicate through song. Minimalist illustrated style, oceanic palette, friendly narrator voice, clear on-screen labels for frequency ranges.”

  • Short Film (Cinematic): “Create a 2-minute cinematic short about a city waking up. Slow dolly shots, golden-hour lighting, soft piano underscore, micro-moments of everyday kindness intercut with skyline timelapses.”

Pro tip: For consistency, add a set of context images (brand palette swatches, product photos, character references). Scrptly excels at keeping those elements coherent across scenes.

Async vs Sync: Choosing the Right Mode

  • Wait For Completion = On: Simpler and great for real-time flows where downstream nodes need the finished file.
  • Wait For Completion = Off: Best for heavy, long-form videos. Scrptly returns a task ID immediately; use a scheduled/polling loop or an HTTP node to check status, then resume processing when complete.

Error Handling & Reliability

  • Wrap your Scrptly node with an If node to catch failures and send alerts (email/Slack) if a run doesn’t complete.
  • Add simple validation before calling Scrptly: ensure prompt length and safe image URLs.
  • Log the task ID to your datastore so you can reconcile or retry later.

Going Further: Distribute Automatically

After the video is generated, chain nodes for:

  • Storage: upload to S3/Drive/Bucket and persist the video URL.
  • CMS: create a new post with the embed link.
  • Email: send the video to your team/clients for approval.
  • Social: hand off to the tools you use for scheduled posting.

A 4k tranquil, surreal city at blue hour with glowing bridges connecting crystalline towers like data pathways; tiny floating screens display abstract timelines and waveforms; soft fog, reflections on water canals, gentle bokeh lights; ultra-detailed, hyperreal, wide composition, calm cinematic mood.

For Developers: Programmatic Options

Prefer to build microservices around video generation?

  • Use the Scrptly API directly in your backend for custom logic.
  • Connect Scrptly with your preferred LLM via MCP to orchestrate multi-agent pipelines.
  • Combine N8N with code: trigger a serverless function that calls Scrptly, then have N8N react to webhooks when the video is ready.

FAQs

  • What makes Scrptly different? Scrptly is designed for longer-form content and character/environment consistency. It orchestrates research, screenplay, narration, and editing for end-to-end outputs.
  • Can I adjust style and format? Yes—control orientation (vertical/horizontal), duration, pacing, genre, and visual style entirely via your prompt.
  • Do I need to be a video pro? No. Scrptly handles the heavy lifting. Your job is to describe the outcome you want and (optionally) supply reference images.

Try It Now

Automate your next ad, explainer, or short film in minutes—not weeks. With Scrptly inside N8N, your prompts become publish-ready videos on autopilot.

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

More from this blog

T

The Lean Ecommerce

87 posts