Code Executiondata Automation Webhook – Business Process Automation | Complete n8n Webhook Guide (Intermediate)
This article provides a complete, practical walkthrough of the Code Executiondata Automation Webhook n8n agent. It connects HTTP Request, Webhook across approximately 1 node(s). Expect a Intermediate setup in 15-45 minutes. One‑time purchase: €29.
What This Agent Does
This agent orchestrates a reliable automation between HTTP Request, Webhook, handling triggers, data enrichment, and delivery with guardrails for errors and rate limits.
It streamlines multi‑step processes that would otherwise require manual exports, spreadsheet cleanup, and repeated API requests. By centralizing logic in n8n, it reduces context switching, lowers error rates, and ensures consistent results across teams.
Typical outcomes include faster lead handoffs, automated notifications, accurate data synchronization, and better visibility via execution logs and optional Slack/Email alerts.
How It Works
The workflow uses standard n8n building blocks like Webhook or Schedule triggers, HTTP Request for API calls, and control nodes (IF, Merge, Set) to validate inputs, branch on conditions, and format outputs. Retries and timeouts improve resilience, while credentials keep secrets safe.
Third‑Party Integrations
- HTTP Request
- Webhook
Import and Use in n8n
- Open n8n and create a new workflow or collection.
- Choose Import from File or Paste JSON.
- Paste the JSON below, then click Import.
-
Show n8n JSON
Title: Automating AI Video Generation with n8n and Luma Labs: A Step-by-Step Workflow Meta Description: Discover how to use a custom n8n workflow to automatically generate AI-driven videos using Luma Labs’ Dream Machine API. This walkthrough covers setup, camera motion randomization, and video data storage in Airtable. Keywords: n8n workflow, Luma Labs API, AI video generation, Dream Machine, Airtable automation, text-to-video API, video automation pipeline, camera motion AI, generative media, no-code tools Third-Party APIs Used: - Luma Labs Dream Machine API (https://api.lumalabs.ai) - Airtable API (https://airtable.com/api) — Article: Automating AI Video Generation with n8n and Luma Labs: A Step-by-Step Workflow As generative AI tools become increasingly powerful and accessible, creators are seeking better ways to automate the production pipeline. One such example is using n8n, an open-source automation tool, to orchestrate video generation using Luma Labs’ Dream Machine API. In this article, we’ll break down a well-structured n8n workflow titled “Luma AI Dream Machine - Simple v1 - AK,” designed to produce short-form videos based on text prompts, with dynamic camera motions, and store relevant metadata in Airtable for easy tracking. Overview This n8n workflow automates the following process: 1. Start a manual video generation request. 2. Define default video parameters (prompt, aspect ratio, duration). 3. Add a random camera motion to enhance visual variety. 4. Send a generation request to Luma Labs’ Dream Machine API. 5. Store video metadata to an Airtable base upon completion. Let’s explore each component of the workflow to understand how the automation comes together. 1. Manual Trigger to Start the Workflow The process begins with a Manual Trigger node called "When clicking ‘Test workflow’." This allows manual testing or initiation from within the n8n editor — perfect during the workflow building phase. 2. Global SETTINGS Node The next node, “Global SETTINGS,” defines the static values used across the entire video generation process. Users can configure: - aspect_ratio: 9:16 for vertical video - video_prompt: “a superhero flying through a volcano” - duration: "5s" - loop: true - callback_url: (where Luma will send status updates) - airtable_base and table: where metadata will be stored - cluster_id: uniquely identifies each generation for tracking Using a Set node for this configuration simplifies updates and promotes reuse. 3. Randomized Camera Motion To add variation between generated videos, the workflow includes a code node — “RANDOM Camera Motion.” This node selects one of several cinematic camera motions such as: - Zoom In / Zoom Out - Orbit Left / Right - Pan Left / Right - Crane Up / Down This randomization adds a layer of dynamism, simulating real-world camera techniques in AI-generated video. Here’s a snippet of the JavaScript used: ```javascript 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 } }]; ``` 4. Calling Luma Labs Dream Machine API Once camera motion is selected, the data is passed into the “Text 2 Video” node — an HTTP Request configured to POST details to https://api.lumalabs.ai/dream-machine/v1/generations. Key payload parameters: - model: “ray-2” - prompt: A combination of the static text prompt and the random camera action - aspect_ratio, duration, loop, and callback_url: all defined in Global SETTINGS Authentication is handled via HTTP Header using a credential connect titled “Luma Header Auth account.” 5. Collecting Execution Data Once the POST request is made to Luma's API, the response (which includes generation ID and metadata) is piped into an “Execution Data” node. This node serves as a transfer point before logging data to Airtable. 6. Storing Video Metadata in Airtable The final step — “ADD Video Info” — leverages the n8n Airtable node to write the result data into a structured table within an Airtable base. Fields created include: - Generation ID - Prompt - Status (set to “Done”) - Cluster ID (unique video identifier) - Video model, aspect ratio, duration, resolution This structured logging is essential for managing results at scale and could be extended further with links to actual media assets, thumbnails, or content titles. Why This Workflow Matters In an age of content saturation, tools that allow creators to generate, manage, and scale media automatically are gold. This n8n workflow showcases how to integrate multiple services in a no-code/low-code environment — blending the creativity of AI with the efficiency of automation. By using open tools like n8n and public APIs like Luma and Airtable, teams can rapidly build production pipelines without writing and maintaining traditional backend infrastructure. Final Thoughts Whether you’re a creator, marketer, or product team experimenting with generative media, this workflow can serve as a jumpstart for your own automated video generation system. From cinematic randomness to robust metadata capture, the architecture is modular and easy to extend. Add voiceovers, implement retry logic, or link to delivery platforms — the power is yours with n8n. Ready to make the magic happen? — Interested developers can clone this workflow into n8n, customize their own video prompts and motion styles, and integrate it seamlessly into a larger content automation strategy.
- Set credentials for each API node (keys, OAuth) in Credentials.
- Run a test via Execute Workflow. Inspect Run Data, then adjust parameters.
- Enable the workflow to run on schedule, webhook, or triggers as configured.
Tips: keep secrets in credentials, add retries and timeouts on HTTP nodes, implement error notifications, and paginate large API fetches.
Validation: use IF/Code nodes to sanitize inputs and guard against empty payloads.
Why Automate This with AI Agents
AI‑assisted automations offload repetitive, error‑prone tasks to a predictable workflow. Instead of manual copy‑paste and ad‑hoc scripts, your team gets a governed pipeline with versioned state, auditability, and observable runs.
n8n’s node graph makes data flow transparent while AI‑powered enrichment (classification, extraction, summarization) boosts throughput and consistency. Teams reclaim time, reduce operational costs, and standardize best practices without sacrificing flexibility.
Compared to one‑off integrations, an AI agent is easier to extend: swap APIs, add filters, or bolt on notifications without rewriting everything. You get reliability, control, and a faster path from idea to production.
Best Practices
- Credentials: restrict scopes and rotate tokens regularly.
- Resilience: configure retries, timeouts, and backoff for API nodes.
- Data Quality: validate inputs; normalize fields early to reduce downstream branching.
- Performance: batch records and paginate for large datasets.
- Observability: add failure alerts (Email/Slack) and persistent logs for auditing.
- Security: avoid sensitive data in logs; use environment variables and n8n credentials.
FAQs
Can I swap integrations later? Yes. Replace or add nodes and re‑map fields without rebuilding the whole flow.
How do I monitor failures? Use Execution logs and add notifications on the Error Trigger path.
Does it scale? Use queues, batching, and sub‑workflows to split responsibilities and control load.
Is my data safe? Keep secrets in Credentials, restrict token scopes, and review access logs.