AutomationFlowsAI & RAG › N8n Video Workflow

N8n Video Workflow

N8N Video Workflow. Uses trigger, openAi, httpRequest. Event-driven trigger; 11 nodes.

Event trigger★★★☆☆ complexityAI-powered11 nodesTriggerOpenAIHTTP Request
AI & RAG Trigger: Event Nodes: 11 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the HTTP Request → OpenAI recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "parameters": {
        "mode": "everyTime",
        "interval": "5"
      },
      "name": "Manual Trigger / Schedule",
      "type": "n8n-nodes-base.trigger",
      "typeVersion": 1,
      "uuid": "start"
    },
    {
      "parameters": {
        "content": "Generate a short video about a futuristic city."
      },
      "name": "Set Video Prompt",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "uuid": "setPrompt",
      "coordinates": [
        400,
        150
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o",
        "temperature": 0.7,
        "maxTokens": 500,
        "messages": [
          {
            "role": "system",
            "content": "You are a creative video script writer. Generate a script for a short video based on the user's prompt, suitable for TikTok/Instagram Reels. Include visual cues and a clear narrative. Keep it concise."
          },
          {
            "role": "user",
            "content": "Generate a script for: {{ $json.content }}"
          }
        ]
      },
      "name": "Generate Video Script (OpenAI)",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "uuid": "generateScript",
      "coordinates": [
        650,
        150
      ]
    },
    {
      "parameters": {
        "url": "https://api.heygen.com/v1/video/generate",
        "method": "POST",
        "jsonBody": true,
        "headers": [
          {
            "name": "X-Api-Key",
            "value": ""
          }
        ],
        "body": {
          "text": "This is a placeholder for the script content.",
          "voice_id": "YOUR_HEYGEN_VOICE_ID",
          "avatar_id": "YOUR_HEYGEN_AVATAR_ID"
        },
        "responseContentType": "json"
      },
      "name": "Generate AI Video (HeyGen)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "uuid": "generateVideo",
      "coordinates": [
        900,
        150
      ]
    },
    {
      "parameters": {
        "url": "https://api.dumpling.ai/get-tiktok-trends",
        "method": "GET",
        "qs": [
          {
            "name": "api_key",
            "value": ""
          },
          {
            "name": "limit",
            "value": "10"
          }
        ],
        "responseContentType": "json"
      },
      "name": "Get TikTok Trends (Dumpling AI)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "uuid": "getTikTokTrends",
      "coordinates": [
        400,
        400
      ]
    },
    {
      "parameters": {
        "url": "https://api.dumpling.ai/get-instagram-reels-trends",
        "method": "GET",
        "qs": [
          {
            "name": "api_key",
            "value": ""
          },
          {
            "name": "limit",
            "value": "10"
          }
        ],
        "responseContentType": "json"
      },
      "name": "Get Instagram Trends (Dumpling AI)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "uuid": "getInstagramTrends",
      "coordinates": [
        650,
        400
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o",
        "temperature": 0.7,
        "maxTokens": 500,
        "messages": [
          {
            "role": "system",
            "content": "Analyze the following social media trends and provide suggestions for enhancing a video based on these trends. Focus on audio, visual styles, and common themes."
          },
          {
            "role": "user",
            "content": "TikTok Trends: [Placeholder for TikTok Trends]\nInstagram Reels Trends: [Placeholder for Instagram Trends]"
          }
        ]
      },
      "name": "Analyze Trends & Suggest (OpenAI)",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "uuid": "analyzeTrends",
      "coordinates": [
        900,
        400
      ]
    },
    {
      "parameters": {
        "conditions": [
          {
            "value1": "success",
            "operator": "equalTo",
            "value2": "success"
          }
        ]
      },
      "name": "Check Video Generation Status",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "uuid": "checkVideoStatus",
      "coordinates": [
        1150,
        150
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o",
        "temperature": 0.7,
        "maxTokens": 200,
        "messages": [
          {
            "role": "system",
            "content": "Write a compelling caption and relevant hashtags for a short video based on the following video topic and trend suggestions. Keep it engaging and concise for TikTok and Instagram Reels."
          },
          {
            "role": "user",
            "content": "Video Topic: [Placeholder for Video Prompt]\nTrend Suggestions: [Placeholder for Trend Suggestions]"
          }
        ]
      },
      "name": "Generate Caption & Hashtags (OpenAI)",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "uuid": "generateCaption",
      "coordinates": [
        1400,
        150
      ]
    },
    {
      "parameters": {
        "url": "https://api.upload-post.com/upload",
        "method": "POST",
        "jsonBody": true,
        "headers": [
          {
            "name": "Authorization",
            "value": "Bearer "
          }
        ],
        "body": {
          "video_url": "PLACEHOLDER_VIDEO_URL",
          "platforms": [
            "tiktok",
            "instagram"
          ],
          "title": "AI Generated Video",
          "description": "AI Generated Video",
          "hashtags": ""
        },
        "responseContentType": "json"
      },
      "name": "Upload to TikTok & Instagram (Upload-Post.com)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "uuid": "uploadVideo",
      "coordinates": [
        1650,
        150
      ]
    },
    {
      "parameters": {},
      "name": "Merge Trend Data",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "uuid": "mergeTrends",
      "mode": "passThrough",
      "coordinates": [
        775,
        400
      ]
    }
  ],
  "connections": {
    "start": [
      {
        "node": "setPrompt",
        "type": "main",
        "index": 0
      },
      {
        "node": "getTikTokTrends",
        "type": "main",
        "index": 0
      }
    ],
    "setPrompt": [
      {
        "node": "generateScript",
        "type": "main",
        "index": 0
      }
    ],
    "generateScript": [
      {
        "node": "generateVideo",
        "type": "main",
        "index": 0
      }
    ],
    "generateVideo": [
      {
        "node": "checkVideoStatus",
        "type": "main",
        "index": 0
      }
    ],
    "getTikTokTrends": [
      {
        "node": "mergeTrends",
        "type": "main",
        "index": 0
      }
    ],
    "getInstagramTrends": [
      {
        "node": "mergeTrends",
        "type": "main",
        "index": 1
      }
    ],
    "mergeTrends": [
      {
        "node": "analyzeTrends",
        "type": "main",
        "index": 0
      }
    ],
    "checkVideoStatus": [
      {
        "node": "generateCaption",
        "type": "main",
        "index": 0
      }
    ],
    "generateCaption": [
      {
        "node": "uploadVideo",
        "type": "main",
        "index": 0
      }
    ]
  },
  "active": false,
  "settings": {
    "workflowMetaData": {
      "name": "AI Video Creator & Social Media Publisher",
      "description": "Generates AI videos with voice, analyzes TikTok/Instagram trends, and publishes to social media.",
      "tags": [
        "AI",
        "Video",
        "Social Media",
        "TikTok",
        "Instagram",
        "Automation"
      ]
    }
  },
  "versionId": "your_version_id"
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

N8N Video Workflow. Uses trigger, openAi, httpRequest. Event-driven trigger; 11 nodes.

Source: https://gist.github.com/krishnabhattarai52/c79b26437426f01e1f790c5f29706f5f — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Categories: Competitive Intelligence, Marketing Automation, AI Analysis

HTTP Request, Google Drive, OpenAI +1
AI & RAG

In this tutorial, I’ll show how to create UGC (User Generated Content) videos automatically using n8n and Sora 2.

Form Trigger, Google Drive, HTTP Request +2
AI & RAG

Categories Marketing Intelligence, Ad Operations, Competitive Research, Creative Analysis

HTTP Request, Google Sheets, OpenAI +3
AI & RAG

Gather product info – Takes product details (name, audience, tone, CTA, script) and product image URL from a form Describe the product – Uses GPT-4o to analyze the product image and generate a detaile

HTTP Request, Jwt, Telegram +2
AI & RAG

inoreader_AI->196267257. Uses httpRequest, openAi, telegram, airtable. Event-driven trigger; 28 nodes.

HTTP Request, OpenAI, Telegram +2