Skip to main content

Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images

Workflow preview

Workflow preview
100%
Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n template demonstrates how to build O'Carla , an advanced all in one Discord AI assistant. It intelligently handles natural conversations, professional image generation, and visual file ana...

Best for

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

Tools used

n8n-nodes-base.webhook, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.respondtowebhook, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.if, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Aslamul Fikri Alfirdausi.

Original n8n.io source

1.1 Workflow description

Title
Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images
Workflow name
Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images

This n8n template demonstrates how to build O'Carla, an advanced all-in-one Discord AI assistant. It intelligently handles natural conversations, professional image generation, and visual file analysis within a single server integration.

Use cases are many: Deploy a smart community manager that remembers past interactions, an on-demand artistic tool for your members, or an AI that can "read" and explain uploaded documents and images!

Good to know

  • API Costs: Each interaction costs vary depending on the model used (Gemini vs. OpenRouter). Check your provider's dashboard for updated pricing.
  • Infrastructure: This workflow requires a separate Discord bot script (e.g., Node.js) to forward events to the n8n Webhook. It is recommended to host the bot using PM2 for 24/7 uptime.

How it works

  1. Webhook Trigger: Receives incoming data (text and attachments) from your Discord bot.
  2. Intent Routing: The workflow uses conditional logic to detect if the user wants an image (via keyword gambar:), a vision analysis (via attachments), or a standard chat.
  3. Multi-Model Intelligence:
    • Gemini 2.5: Powers rapid and high-quality general chat reasoning.
    • Llama 3.2 Vision (via OpenRouter): Specifically used to describe and analyze images or text-based files.
    • Flux (via Pollinations): Uses a specialized AI Agent to refine prompts and generate professional-grade images.
  4. Contextual Memory: A 50-message buffer window ensures O'Carla maintains the context of your conversation based on your Discord User ID.
  5. Clean UI Output: Generated image links are automatically shortened via TinyURL to keep the Discord chat interface tidy.

How to use

  1. Connect your Google Gemini and OpenRouter API keys in the respective nodes.
  2. Replace the Webhook URL in your bot script with this workflow's Production Webhook URL.
  3. Type gambar: [your prompt] in Discord to generate images.
  4. Upload an image or file to Discord to trigger the AI Vision analysis.

Requirements

  • n8n instance (Self-hosted or Cloud).
  • Google Gemini API Key.
  • OpenRouter API Key.
  • Discord Bot Token and hosting environment.

Customising this workflow

O'Carla is highly flexible. You can change her personality by modifying the System Message in the Agent nodes, adjust the memory window length, or swap the LLM models to specialized ones like Claude 3.5 or GPT-4o.

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 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 2 - Simple Memory

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

Block 3 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 4 - correctNaming

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Discord AI Response Agent

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

Block 6 - If

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

Block 7 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Fields - Set Values

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

Block 9 - Code - Clean Json

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Code - Get Prompt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Code - Set Filename

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - AI Agent - Create Image From Prompt

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

Block 13 - Google Gemini Chat Model1

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

Block 14 - Handle Respons

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Format Discord Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Respond to Webhook2

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 17 - Error Handler

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Has Atc

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

Block 19 - Code1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - Create Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - Change Link To Be Sort

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 23 - Simple Memory1

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

Block 24 - Respond to Webhook3

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Showing the first 24 of 42 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images
Complexity advanced
Nodes 42
Categories Support Chatbot, AI Chatbot
Author Aslamul Fikri Alfirdausi
Published 24 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12097/12097.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 Create an all-in-one Discord assistant with Gemini, Llama Vision & Flux images do?

This n8n template demonstrates how to build O'Carla , an advanced all in one Discord AI assistant. It intelligently handles natural conversations, professional image generation, and visual file ana...

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 Support Chatbot, AI Chatbot use case.