# Multi-functional Discord bot: Llama AI, image generation: n8n workflow

> Started by an event in a connected app, and works across Discord. It puts a local model behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/multi-functional-discord-bot-llama-ai-image-generation (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# Multi-functional Discord bot: Llama AI, image generation

Started by an event in a connected app, and works across Discord. It puts a local model behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 30 steps, 5 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: a local model Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmulti-functional-discord-bot-llama-ai-image-generation)

**30 steps** Large: read it before trusting it with anything live

**5** Branches: places the flow splits

**3** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 10 Logic 10 Service 9

The steps in the order they run, from what starts it.

- 1 **Window Buffer Memory** Memory Buffer Window *Model*
- 2 **n8n Trigger** N8n trigger *Starts it*
- 3 **Search** Tool Serp Api *Model*
- 4 **Wikipedia** Tool Wikipedia *Model*
- 5 **Window Buffer Memory1** Memory Buffer Window *Model*
- 6 **Search3** Tool Serp Api *Model*
- 7 **Wikipedia3** Tool Wikipedia *Model*
- 8 **Ollama Chat Model** Lm Chat Ollama *Model*
- 9 **Ollama Chat Model1** Lm Chat Ollama *Model*
- 10 **General Agent** Agent *Model*
- 11 **Reciever** Discord *Service*
- 12 **Image Prompter** Agent *Model*
- 13 **Discord** Discord *Service*
- 14 **Users message** If *Logic*
- 15 **Google Image Generator** Http Request *Service*
- 16 **Wait** Wait *Logic*
- 17 **Letters OR Voice** If *Logic*
- 18 **Wait2** Wait *Logic*
- 19 **Code** Code *Logic*
- 20 **Shorting Voice** If *Logic*
- 21 **Discord2** Discord *Service*
- 22 **Fetch Audio from URL** Http Request *Service*
- 23 **Image Type** If *Logic*
- 24 **Wait3** Wait *Logic*
- 25 **GROQ Audio To Text** Http Request *Service*
- 26 **Fetch Image from Proxy URL** Http Request *Service*
- 27 **Creating Or Analyzing** If *Logic*
- 28 **Convert Binary to Base64** Code *Logic*
- 29 **Groq Image To Text** Http Request *Service*
- 30 **Discord3** Discord *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 30, with 5 branches, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Discord
- **Model:** a local model
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Discord account, and a key for a local model. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls a local model. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 30 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 30 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmulti-functional-discord-bot-llama-ai-image-generation)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Discord](https://millionrounds.com/workflows?service=Discord#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Draft and track incident postmortems with OpenAI** 30 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/draft-and-track-incident-postmortems-with-openai-2)
- [**Pick a Topic & Auto-Publish Translated Content** 30 steps · calls a model · Discord, Google Drive](https://millionrounds.com/workflow/pick-a-topic-and-auto-publish-translated-content)
- [**Repurpose YouTube videos across social media with Gemini** 30 steps · calls a model · Discord, RSS](https://millionrounds.com/workflow/repurpose-youtube-videos-across-social-media-with-gemini)
- [**Draft and track incident postmortems with OpenAI** 29 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/draft-and-track-incident-postmortems-with-openai)
- [**Split shared rental utility bills with Postgres and Gmail** 29 steps · Discord, Gmail](https://millionrounds.com/workflow/split-shared-rental-utility-bills-with-postgres-and-gmail)
- [**Translate RSS news and publish** 31 steps · Discord, Gmail](https://millionrounds.com/workflow/translate-rss-news-and-publish)
