Skip to main content

Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent

Workflow preview

Workflow preview
100%
Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Analyze uploaded images, videos, audio, and documents with specialized tools — powered by a lightweight language only agent. What It Does This workflow enables multimodal file analysis using ...

Best for

  • Document Extraction automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, n8n-nodes-base.splitinbatches, n8n-nodes-base.splitout, n8n-nodes-base.aggregate, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.googlegeminitool, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mauricio Perera.

Original n8n.io source

1.1 Workflow description

Title
Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent
Workflow name
Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent

📁 Analyze uploaded images, videos, audio, and documents with specialized tools — powered by a lightweight language-only agent.


🧭 What It Does

This workflow enables multimodal file analysis using Google Gemini tools connected to a text-only LLM agent. Users can upload images, videos, audio files, or documents via a chat interface. The workflow will:

  • Upload each file to Google Gemini and obtain an accessible URL.
  • Dynamically generate contextual prompts based on the file(s) and user message.
  • Allow the agent to invoke Gemini tools for specific media types as needed.
  • Return a concise, helpful response based on the analysis.

🚀 Use Cases

  • Customer support: Let users upload screenshots, documents, or recordings and get helpful insights or summaries.
  • Multimedia QA: Review visual, audio, or video content for correctness or compliance.
  • Educational agents: Interpret content from PDFs, diagrams, or audio recordings on the fly.
  • Low-cost multimodal assistants: Achieve multimodal functionality without relying on large vision-language models.

🎯 Why This Architecture Matters

Unlike end-to-end multimodal LLMs (like Gemini 1.5 or GPT-4o), this template:

  • Uses a text-only LLM (Qwen 32B via Groq) for reasoning.
  • Delegates media analysis to specialized Gemini tools.

✅ Advantages

Feature Benefit
🧩 Modular LLM + Tools are decoupled; can update them independently
💸 Cost-Efficient No need to pay for full multimodal models; only use tools when needed
🔧 Tool-based Reasoning Agent invokes tools on demand, just like OpenAI’s Toolformer setup
⚡ Fast Groq LLMs offer ultra-fast responses with low latency
📚 Memory Includes context buffer for multi-turn chats (15 messages)

🧪 How It Works

🔹 Input via Chat

  • Users submit a message and (optionally) files via the chatTrigger.

🔹 File Handling

  • If no files: prompt is passed directly to the agent.

  • If files are included:

    • Files are split, uploaded to Gemini (to get public URLs).
    • Metadata (name, type, URL) is collected and embedded into the prompt.

🔹 Prompt Construction

  • A new chatInput is dynamically generated:

    User message
    Media: [array of file data]
    

🔹 Agent Reasoning

  • The Langchain Agent receives:

    • The enriched prompt

    • File URLs

    • Memory context (15 turns)

    • Access to 4 Gemini tools:

      • IMG: analyze image
      • VIDEO: analyze video
      • AUDIO: analyze audio
      • DOCUMENT: analyze document

The agent autonomously decides whether and how to use tools, then responds with concise output.


🧱 Nodes & Services

Category Node / Tool Purpose
Chat Input chatTrigger User interface with file support
File Processing splitOut, splitInBatches Process each uploaded file
Upload googleGemini Uploads each file to Gemini, gets URL
Metadata set, aggregate Builds structured file info
AI Agent Langchain Agent Receives context + file data
Tools googleGeminiTool Analyze media with Gemini
LLM lmChatGroq (Qwen 32B) Text reasoning, high-speed
Memory memoryBufferWindow Maintains session context

⚙️ Setup Instructions

1. 🔑 Required Credentials

  • Groq API key (for Qwen 32B model)
  • Google Gemini API key (Palm / Gemini 1.5 tools)

2. 🧩 Nodes That Need Setup

  • Replace existing credentials on:

    • Upload a file
    • Each GeminiTool (IMG, VIDEO, AUDIO, DOCUMENT)
    • lmChatGroq

3. ⚠️ File Size & Format Considerations

  • Some Gemini tools have file size or format restrictions.
  • You may add validation nodes before uploading if needed.

🛠️ Optional Improvements

  • Add logging and error handling (e.g., for upload failures).
  • Add MIME-type filtering to choose the right tool explicitly.
  • Extend to include OCR or transcription services pre-analysis.
  • Integrate with Slack, Telegram, or WhatsApp for chat delivery.

🧪 Example Use Case

> "Hola, ¿qué dice este PDF?"

Uploads a document → Agent routes it to Gemini DOCUMENT tool → Receives extracted content → LLM summarizes it in Spanish.


🧰 Tags

multimodal, agent, langchain, groq, gemini, image analysis, audio analysis, document parsing, video analysis, file uploader, chat assistant, LLM tools, memory, AI tools

📂 Files

  • This template is ready to use as-is in n8n.
  • No external webhooks or integrations required.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 2 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - Split Out Files

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 4 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 5 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 6 - IMG

Type / Role
@n8n/n8n-nodes-langchain.googleGeminiTool - googleGeminiTool
Config choices
Version 1

Block 7 - VIDEO

Type / Role
@n8n/n8n-nodes-langchain.googleGeminiTool - googleGeminiTool
Config choices
Version 1

Block 8 - AUDIO

Type / Role
@n8n/n8n-nodes-langchain.googleGeminiTool - googleGeminiTool
Config choices
Version 1

Block 9 - DOCUMENT

Type / Role
@n8n/n8n-nodes-langchain.googleGeminiTool - googleGeminiTool
Config choices
Version 1

Block 10 - Input

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 11 - If Not Files

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Upload a file

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 13 - File data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Update Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Generate chat Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 17 - Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent
Complexity advanced
Nodes 21
Categories Document Extraction, AI Chatbot
Author Mauricio Perera
Published 05 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7026/7026.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze images, videos, documents & audio with Gemini Tools and Qwen LLM Agent do?

Analyze uploaded images, videos, audio, and documents with specialized tools — powered by a lightweight language only agent. What It Does This workflow enables multimodal file analysis using ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Chatbot use case.