AI-Powered Video Content Analysis with Gemini - n8n Workflow

Use this powerful n8n workflow to automatically analyze video content using Google's Gemini AI. Download, upload, and generate detailed descriptions using custom n8n node logic.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content Marketers: Automating the creation of detailed descriptions and tags for video assets.
Media Analysts: Quickly generating transcripts or visual descriptions for large video libraries.
Developers: Learning how to handle multi-part binary data uploads and complex API interactions within an n8n workflow.
SEO Specialists: Creating rich metadata for video content using AI-generated descriptions.

Overview

Analyzing video content manually is time-consuming and inefficient. This sophisticated n8n workflow solves this by fully automating the process using Google's powerful Gemini AI. The solution handles the entire video lifecycle: fetching the video from a URL, uploading the large binary file directly to the Gemini service using specific HTTP Request header commands, and finally prompting the AI model (Gemini 2.0 Flash) to deliver a comprehensive visual analysis. This n8n workflow is an excellent example of using custom HTTP Request n8n node configurations for advanced integrations where no dedicated node exists, providing a robust foundation for building high-performance aiautomationworkflows.

How it Works

This n8n workflow operates in a distinct sequence of steps to manage the video file and communicate with the Gemini API:


  1. Trigger and Input: The n8n workflow starts with a Manual Trigger (for testing) that feeds into the Set Input n8n node, providing a sample video_url.

  2. Download: The Download video n8n node uses an HTTP Request to fetch the video data from the URL, transforming it into binary data ready for the next step.

  3. Upload: The Upload video Gemini n8n node is configured with precise HTTP headers (X-Goog-Upload-Command, X-Goog-Upload-Header-Content-Length, Content-Type) to correctly stream the binary data to Gemini's file upload endpoint. This requires referencing a secure GeminiKey environment variable.

  4. Flow Control: A Wait n8n node acts as a temporary delay or flow control mechanism, ensuring the upload process is registered before moving to the computationally intensive analysis phase.

  5. Analysis Request: The Analyze video Gemini n8n node sends a second HTTP Request. This request uses the file URI returned from the previous upload step and includes a detailed system prompt asking the Gemini 2.0 Flash model to describe all visual elements, actions, branding, style, and tone of the video.

  6. Output Extraction: Finally, the Get Result n8n node extracts the AI's detailed textual description from the complex Gemini JSON response, setting the final output variable videoDescription. This complete sequence demonstrates a high-utility n8n workflow for media processing.

Installation Guide

To deploy and run this powerful n8n templates workflow, follow these steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the 'Import Workflow' function.

  2. API Key Setup: This n8n workflow relies on the Gemini API. You must set an environment variable named GeminiKey in your n8n environment or configure a secure Credential.

  3. URL Modification: Locate the Set Input n8n node and replace the placeholder video URL with the URL of the video you wish to analyze. For a production environment, you would replace the initial manual n8n trigger with a Webhook or a monitoring n8n trigger like an S3 or Google Drive watch node.

  4. Testing: Click the 'Test workflow' button on the manual n8n trigger to execute the flow and see the AI-generated analysis in the final 'Get Result' node.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The starting n8n trigger for testing the flow and injecting the initial data.
Set Input (Set n8n node): Defines the video_url variable that the rest of the n8n workflow uses, streamlining input data management.
Download video (HTTP Request): Function is to fetch the video file content from the URL specified in the input, converting it into binary data ($binary.data) needed for the subsequent upload.
Upload video Gemini (HTTP Request): This complex n8n node handles the multipart file upload to the Gemini API. Key Configuration includes using the POST method, setting the contentType to binaryData, and defining crucial X-Goog-Upload headers to manage the upload command and file size.
Wait (Wait n8n node): Used here as a necessary flow control component to allow time for the potentially large video file to be processed by the Gemini servers post-upload.
Analyze video Gemini (HTTP Request): Sends the core analysis request. Key Configuration involves a detailed JSON body containing the uploaded file URI and a long text prompt asking the AI to describe the visuals, branding, style, and tone. This is the main intelligence component of the n8n workflow.


  • Get Result (Set n8n node): Extracts the final analysis text from the API response payload into an easily consumable variable named videoDescription.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Seasoned Data Engineer with over 8 years of experience in digital marketing analytics and workflow automation. Expert in leveraging tools like n8n, Python, and SQL to streamline data integration and optimize operational efficiency. Passionate about enhancing productivity through innovative automation strategies.

Featured*