Automate Stunning AI Videos with Luma AI & n8n

Save hours creating AI-generated videos with this Luma AI Dream Machine workflow using n8n automation. From dynamic camera motions to Airtable logging, this workflow streamlines creative video production effortlessly.
httpRequest
airtable
code
+4
Workflow Identifier: 2096
NODES in Use: Manual Trigger, Code, HTTP Request, Set, Airtable, Execution Data, Sticky Note
Automate AI videos with Luma AI and n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does ⚙️

This workflow helps create AI videos automatically in n8n.

It solves the problem of spending too much time setting video prompts and camera moves.

After running, it makes videos with random camera actions and saves info in Airtable for easy follow-up.

The main result is faster video creation with less mistakes, freeing time for more ideas.


Inputs, Processing Steps, and Outputs

Inputs

  • User-defined video prompt describing the scene or idea.
  • Preset camera motions list inside the code node for variety.
  • API credentials for Luma AI and Airtable.

Processing Steps

  • The Set node holds main video settings like prompt and duration.
  • The Code node picks one camera motion randomly from a list.
  • The HTTP Request node builds and sends a POST request to the Luma AI API with combined text prompt and motion.
  • The Execution Data node reads returned video metadata.
  • The Airtable node saves the video details like model, aspect ratio, and cluster ID for tracking.

Outputs


Who Should Use This Workflow?

This is for video creators who want to save time and avoid errors during AI video making.

Anyone who needs quick, varied camera motions and reliable video data logging will benefit.

This also suits automation lovers using n8n on the cloud or through self-host n8n.


Tools and Services Used

  • n8n Automation Platform: Runs the workflow.
  • Luma AI Dream Machine API: Creates AI videos from text.
  • Airtable: Stores video metadata.
  • JavaScript Code Node: Selects random camera motion.
  • HTTP Header Authentication: Secures API connection.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Download and Import the Workflow

  1. Click the Download button on this page.
  2. Open your n8n editor.
  3. Select Import from File and upload the downloaded workflow file.

Step 2: Configure Credentials and Settings

  1. Go to Credentials and add your Luma AI API Key using HTTP Header Authentication.
  2. Set your Airtable API Key with the correct base and table names.
  3. In the Set (Global SETTINGS) node, update fields like video_prompt, aspect_ratio, duration, and the callback_url.

Step 3: Test the Workflow

  1. Run the Manual Trigger node by clicking “Execute Node”.
  2. Check the execution data and Airtable for the new video records.

Step 4: Activate the Workflow

  1. Switch the workflow toggle to active for production use.
  2. Use this to trigger video generation anytime without manual setup.

Example Code for Random Camera Motion

This code picks one motion randomly from a list.

const items = [
  "Static",
  "Move Left",
  "Move Right",
  "Move Up",
  "Move Down",
  "Push In",
  "Pull Out",
  "Zoom In",
  "Zoom Out",
  "Pan Left",
  "Pan Right",
  "Orbit Left",
  "Orbit Right",
  "Crane Up",
  "Crane Down"
];
const randomItem = items[Math.floor(Math.random() * items.length)];
return [{ json: { action: randomItem } }];

Common Customizations

  • Change the main video prompt in the Set node to any scene description.
  • Edit the camera motions list in the Code node to add or remove actions.
  • Adjust video duration and loop settings for different styles.
  • Use a real callback URL to catch video status updates.
  • Add more Airtable nodes to save videos in multiple bases.

Troubleshooting 🔧

  • 401 Unauthorized error means the API Key is wrong or missing.

    Check HTTP Header Authentication setup.
  • Code node syntax error means the JavaScript has mistakes.

    Copy-paste the exact code, watch for missing symbols.
  • No data in Airtable means Base or Table IDs don’t match.

    Double check your Airtable setup.

Pre-Production Checklist ✅

  • Verify all API Keys for Luma AI and Airtable are active.
  • Run the workflow manually to confirm no errors happen.
  • Confirm Airtable tables allow writing new data.
  • Check that callback URL is correctly set if used.
  • Ensure HTTP Request nodes return valid JSON with video info.

Summary and Results

→ The workflow creates AI videos with random camera motions in few clicks.

✓ Saves time from repeating manual video setup.

✓ Logs all video information in Airtable automatically.

Generates unique cluster IDs for organizing video batches.

→ Works with n8n, Luma AI, and Airtable to streamline video projects.


Automate AI videos with Luma AI and n8n

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Check that the HTTP Header Authentication uses the correct API Key and header name as provided by Luma AI.
Syntax errors happen when the JavaScript code is mistyped or missing brackets; use the exact provided code to avoid this.
This happens when Airtable Base ID or Table name does not match the account; verify these IDs and the API Key permissions.
Yes, replace the placeholder callback URL with your own webhook URL to receive asynchronous updates from Luma AI.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.