AutomationFlowsAI & RAG › Analyze Videos with Google Gemini AI - Form Uploads & Youtube Links

Analyze Videos with Google Gemini AI - Form Uploads & Youtube Links

ByLeeWei @leeweihernandez07 on n8n.io

Google Gemini API Key Go to Google AI and sign up to get your free API key. Create your query authorization credential using that API key in the HTTP Request nodes (e.g., "Upload File", "Get Analysis") that require a Google Gemini credential. Form Trigger Setup Ensure the On…

Event trigger★★★★☆ complexity15 nodesHTTP RequestForm Trigger
AI & RAG Trigger: Event Nodes: 15 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #8017 — we link there as the canonical source.

This workflow follows the Form Trigger → HTTP Request 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": [
    {
      "id": "608b8d6d-3abc-4a53-aa81-5b6b13d9a874",
      "name": "Get Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        736,
        304
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"fileData\": {\n            \"fileUri\": \"{{ $json.file.uri }}\",\n            \"mimeType\": \"{{ $json.file.mimeType }}\"\n          }\n        },\n        {\n          \"text\": \"Describe what's going on in the video in great detail. Describe the entire video.\"\n        }\n      ]\n    }\n  ]\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cfeadae7-65d6-4b79-823e-8db5024fac25",
      "name": "Upload File ",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        64
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/upload/v1beta/files",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Goog-Upload-Command",
              "value": "start, upload, finalize"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Length",
              "value": "={{ $binary.Video.fileSize }}"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Type",
              "value": "={{ $binary.Video.fileType }}/{{ $binary.Video.fileExtension }}"
            },
            {
              "name": "Content-Type",
              "value": "={{ $binary.Video.fileType }}/{{ $binary.Video.fileExtension }}"
            }
          ]
        },
        "inputDataFieldName": "Video"
      },
      "typeVersion": 4.2
    },
    {
      "id": "89df5f59-2806-42dd-aa6e-7d5e1d6a0f07",
      "name": "5 seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        976,
        304
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5150add7-edf5-49ca-92f9-385efcf8184b",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        720,
        64
      ],
      "parameters": {
        "options": {},
        "formTitle": "Insert Video",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Video",
              "multipleFiles": false,
              "requiredField": true
            }
          ]
        },
        "formDescription": "Drop in a video for analysis."
      },
      "typeVersion": 2.2
    },
    {
      "id": "2e6a1e17-a406-485f-b5d6-2f1bbee090af",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 220,
        "content": "## Form Trigger\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b8fc011e-f9da-4729-a88e-b1dcd4745a0b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 220,
        "content": "## Upload File\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ccba1069-f0fd-48e5-ab15-467142b72d02",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        240
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 220,
        "content": "## Get Analysis\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "526c98ac-9783-4abd-aa31-ee9a14fe32a4",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1200,
        64
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "4996040a-b998-4eef-8a5a-3c4c316ed546",
      "name": "Video Analysis",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        304
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "268682ab-62a0-4e6f-aea0-652b30325f70",
              "name": "Video Analysis",
              "type": "string",
              "value": "={{ $json.candidates[0].content.parts[0].text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8d6f60d5-6063-41e3-b0b8-b5cc0076b313",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        240
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 220,
        "content": "## Result\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "15f412e3-5958-4d8d-abab-7c7da62382fd",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "disabled": true,
      "position": [
        736,
        608
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0cb0b756-1657-4c32-b9e0-63580319fe0a",
      "name": "YouTube Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        608
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"contents\": [\n    {\n      \"parts\": [\n        {\n          \"text\": \"Please summarize the video in 3 sentences.\"\n        },\n        {\n          \"file_data\": {\n            \"file_uri\": \"https://youtu.be/gwCQF--cARA?si=uCbaUnoRlEjHO50a\"\n          }\n        }\n      ]\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "ffa376e6-4c1b-400e-8ead-98e7e5a6f8d2",
      "name": "Get Results",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        608
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2103b25e-fbee-4d71-9224-280f1c2383da",
              "name": "text",
              "type": "string",
              "value": "={{ $json.candidates[0].content.parts[0].text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b838e099-4651-4561-92e1-36b856a50f06",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        528
      ],
      "parameters": {
        "color": 2,
        "width": 688,
        "height": 260,
        "content": "# YouTube Vision\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7ae7e8a0-69ee-48a1-81a4-ef53af8805cb",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 640,
        "height": 800,
        "content": "# \ud83d\udee0\ufe0f Setup Guide  \n*Author: [Lee Wei]*\n\n### \u2705 Step 1: Get Your Free API Key  \nGo to [**Google**](https://ai.google.dev/) and sign up to get your **free API key**.\n\nCreate your query authorization credential using that API key in the **HTTP Request** nodes that require a Google credential.\n\n\n### \ud83c\udfac Step 2: Drop in a Video  \nYou\u2019re basically all set! Now you can:\n- Upload a video using the **Form Trigger**, **OR**\n- Drop in a **YouTube URL** to have it analyzed.\n---\n\nThat\u2019s it \u2014 your video analysis agent is ready to go.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5 seconds": {
      "main": [
        [
          {
            "node": "Get Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Analysis": {
      "main": [
        [
          {
            "node": "Video Analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "5 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload File ": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube Video": {
      "main": [
        [
          {
            "node": "Get Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Upload File ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "YouTube Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

Google Gemini API Key Go to Google AI and sign up to get your free API key. Create your query authorization credential using that API key in the HTTP Request nodes (e.g., "Upload File", "Get Analysis") that require a Google Gemini credential. Form Trigger Setup Ensure the On…

Source: https://n8n.io/workflows/8017/ — 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

This workflow is ideal for content creators, video marketers, and research professionals who need to extract actionable insights, detailed transcripts, or metadata from YouTube videos efficiently. It

HTTP Request, Google Drive, Gmail +2
AI & RAG

Legal, Procurement, and Compliance teams at mid-size companies. ESN and agencies selling AI-powered contract review as a service.

Form Trigger, HTTP Request, Form +4
AI & RAG

This workflow takes a Loom link, extracts the video ID, uses the Loom API to download the video, then sends it to Gemini along with your question. Finally, it sends the output to Slack.

HTTP Request, Form Trigger, Slack
AI & RAG

This template is designed for filmmakers, content creators, social media managers, and AI developers who want to harness OpenAI's Sora 2 for creating physically accurate, cinematic videos with synchro

HTTP Request, Form Trigger, Form +1
AI & RAG

Transform text prompts into stunning images or edit existing visuals using OpenAI's latest GPT-4 Vision model through an intuitive web form interface.

Google Drive, HTTP Request, Form Trigger +1