BlogContact

How To Generate AI Videos In N8N Workflows Step By Step

If you’re ready to automate AI video generation directly inside your n8n workflows, this step-by-step guide is for you. We’ll use Scrptly — an AI Video Agent that turns your prompts (and optional reference images) into ads, product showcases, explainers, anime, or even short films. Because Scrptly’s multi-agent system handles research, character design, narration, editing, and consistency for you, it’s perfect for hands-off automation and long-form content.
Link: Explore Scrptly and start creating today → https://scrptly.com/
Why n8n + Scrptly is a powerhouse for video automation
  • Zero editing overhead: Describe your video once; Scrptly’s agent does the rest — script, scenes, narration, and editing.
  • Consistency for long-form: Provide context images to keep characters, products, and environments consistent across scenes.
  • Works at scale: Use n8n triggers (webhook, schedule, forms, CRM events) to create videos programmatically and distribute them instantly.
  • Developer-friendly: Scrptly offers an API, VDK, MCP interface, and a native n8n node.
What you’ll build
  • A production-ready n8n workflow that:
Prerequisites
  • n8n (self-hosted or cloud)
  • A Scrptly account and API key: https://scrptly.com/
  • Optional: Product or brand images for visual consistency
Step 1 — Install the Scrptly node in n8n
  1. In n8n, go to Settings → Community Nodes → Install New
  2. Search for: n8n-nodes-scrptly
  3. Click Install
  4. Confirm the installation and restart if prompted
Reference: Scrptly n8n node on GitHub → https://github.com/ybouane/n8n-nodes-scrptly
Step 2 — Add credentials (API key)
  1. Open the Credentials tab in the n8n editor
  2. New Credential → choose Scrptly API
  3. Paste your API key from your Scrptly account page
  4. Save and select these credentials in your Scrptly node
Security tip: Store your API key in environment variables for self-hosted setups and rotate keys periodically.
Step 3 — Build your first workflow
  • Trigger: Choose how the workflow starts.
  • Scrptly node: Configure the AI video request.
Example prompt you can paste
Create a 45–60 second vertical UGC-style product ad introducing our new leather messenger bag. Keep a warm, cinematic vibe with soft window light. Structure:
1) Hook (first 3 seconds): quick tease about durability and style
2) Problem (scratched bags, awkward pockets)
3) Solution (close-ups of stitching, pockets, adjustable strap)
4) Social proof (voiceover mentions 1,000+ happy customers)
5) CTA: “Shop the new leather messenger bag today.”
Maintain consistent product visuals based on the provided context images. Include gentle foley + soft lo-fi background music. End with a clean product shot and a text overlay.
  • Post-processing node(s): Decide where the generated video goes.
How to pass context images for consistency
  • In the Scrptly node → Context Images, provide URLs to key references:
  • Scrptly’s agent uses these to maintain consistent visuals throughout the video — crucial for ads and multi-scene explainers.
Step 4 — Synchronous vs. asynchronous runs
  • Wait For Completion = On: The Scrptly node holds until the video is ready, then passes the final file URL to downstream nodes. Ideal for simple flows.
  • Wait For Completion = Off: The node returns immediately with a task ID so you can:
Note: For most first-time setups, keep Wait For Completion enabled.
Step 5 — Distribute the result
  • Map the video URL payload from the Scrptly node to your distribution nodes. Common patterns:
Advanced prompt tips for higher-quality results
  • Be explicit about length and orientation: “60–75 seconds, vertical 9:16” or “landscape 16:9.”
  • Specify pacing and structure: “hook → problem → solution → proof → CTA.”
  • Name characters and places to keep continuity: “Ava (host), brick studio loft.”
  • Match your brand mood: “soft cinematic color grade, warm highlights, modern minimalist typography.”
  • For documentaries or explainers, ask for narration style: “clear, friendly, authoritative voice; subtle underscore.”
Common n8n setup issues (and quick fixes)
  • Community node installation blocked: Enable “Allow Community Nodes” in n8n settings (admin-level permission may be required).
  • Invalid API key: Re-check the value in Credentials; rotate the key from your Scrptly account if needed.
  • Empty or broken context image URLs: Verify they’re publicly accessible or pass binary files in n8n.
  • Exceeded token budget: Increase “Approve Up To” for complex prompts or shorten the requested length.
  • Missing output mapping: Expand the Scrptly node output to locate the video URL and map it to your next node.
Optional: Test Scrptly with code (outside n8n)
If you prefer to validate your prompt programmatically before wiring n8n, you can install the SDK:
npm install scrptly
# or
yarn add scrptly
import Scrptly from 'scrptly';

Scrptly.setApiSettings({
apiKey: process.env.SCRPTLY_API_KEY,
});

// See Scrptly's API/VDK docs for creating full videos programmatically.
// Tip: Mirror the same prompt you use in n8n for consistent results.
Use-case recipes you can launch today
  • Ecommerce drops: Webhook on “new product” → Scrptly video → S3/Drive → Slack approvals → social scheduler.
  • Faceless YouTube: Scheduled topic list → Scrptly long-form explainer → auto-captioning → YouTube upload.
  • Research/education: Publish cadence → documentary-style narratives with consistent visuals → email course drip.
  • Agencies: Form intake (client/product/assets) → Scrptly → internal review → multi-channel publishing.
Why Scrptly excels for long-form
Scrptly’s multi-agent pipeline (research, screenplay, narration, editing, and more) plus context-image consistency gives you feature-length reliability without manual stitching. That’s especially useful for tutorials, product walkthroughs, docu-style content, and narrative shorts.
Get started now
  • Sign up for Scrptly: https://scrptly.com/
  • Install the n8n node: Search for “n8n-nodes-scrptly” in Community Nodes
  • Build your first workflow in under an hour and automate your next ad, explainer, or short film
Final checklist
Prompt crafted with clear structure, style, length, and orientation
Context images attached for visual consistency
Budget set appropriately (raise for long-form)
Wait For Completion set as needed for your flow
Distribution nodes configured (storage, review, publish)
Automation doesn’t have to sacrifice creativity. With Scrptly inside n8n, you’ll generate consistent, professional videos on a reliable cadence — without touching a timeline.