Mindket

Slack slash command answered by a Gemini agent with memory

Newversion 1 · updated

Overview

An n8n workflow that answers a Slack slash command: an agent on a Google Gemini model writes the reply, remembers the recent exchanges with that person and posts it in the channel.

Slack slash command answered by a Gemini agent with memory is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: bring in the file, connect your accounts and switch it on
  • Your own n8n server: the same file, behind an https address
  • A local install: only with a tunnel that gives Slack a public address
  • A Slack workspace: one command, used wherever the app is a member

Platform

Connects 2 apps

How it works

Trigger

A Slack slash command

It starts when someone types the command in Slack. Set first:

  • A Google Gemini credential
  • A Slack bot token
  • A slash command in your Slack app that points at the webhook address

Actions

  1. Slack sends the command, and the webhook answers at once
  2. The agent takes the text of the command as its prompt
  3. The last 10 exchanges of that person in that channel are loaded
  4. The Gemini model writes the answer
  5. The question and the answer are posted in the same channel

Result

A reply in the Slack channel that repeats the question and gives the answer

Integrations

What you need before you start.

Google Gemini

Language model

Writes the answer from the prompt and the remembered exchanges.

NeedsGoogle Gemini API key

Slack

Team chat

Sends the command in and receives the reply.

NeedsSlack app with a slash command and a bot token

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
3 steps, starting when its webhook is called
AI
1 step calls an AI model: Agent
Sign-ins
Signs in to: Slack and Google Gemini
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 3 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow puts an AI assistant behind a Slack slash command. A person types the command and a question in any channel the app is in. An agent on a Google Gemini model writes the answer. It remembers the last few exchanges with that person, so a follow-up such as a request for a shorter version makes sense. The reply is posted back in the same channel. No new app to learn. Five nodes sit in it, beside five sticky notes.

Who it suits

Small teams that live in Slack and want a quick assistant that answers in the channel where the question came up, without opening a new tool or a new tab. It suits an admin who can make a Slack app and run an n8n that Slack can reach. Skip it if you need answers from your own documents, because the agent has no data source. Skip it too if the command must be limited to certain people, since nothing here checks who asks.

Who uses it, and how
IndustryWho uses itHow they use itExample
OperationsTeam leadsAsk quick questions without leaving SlackA lead types the command and asks how to word a polite reminder to a supplier.
SupportSupport agentsDraft a first reply to a customerAn agent pastes a customer’s question and gets a draft to edit.
MarketingMarketersGet a few headline ideasA marketer asks for five subject lines, then asks for shorter ones.
EducationTeachersExplain a topic in plain wordsA teacher asks for a short explanation of fractions for ten-year-olds.

You need a Slack app with a slash command, a Google Gemini API key, and an n8n that Slack can reach over https.

Where to use it

Any n8n with a public https address will run it, because Slack has to call the webhook, and Slack waits only three seconds for an acknowledgement. A local install works only when you give it a public address. Switch the workflow on first, then give its production address to Slack.

  • n8n Cloud: bring in the file, connect your accounts and switch it on
  • Your own n8n server: the same file, behind an https address
  • A local install: only with a tunnel that gives Slack a public address
  • A Slack workspace: one command, used wherever the app is a member

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Import the file, add two credentials, switch it on and paste its address into a Slack slash command.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own, reachable over https
Google GeminiAn API key
SlackAn app with a slash command and a bot token that has the chat:write scope, and the app in the channel or with chat:write.public
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Google Gemini (PaLM) API credential with your key to Google Gemini Chat Model.
  3. Add a Slack API credential with your bot token to Send response back to slack channel.
  4. Save the workflow and switch it on. Copy the production address of Webhook to receive message, which ends in /webhook/slack-bot.
  5. In your Slack app, add a slash command and paste that address as its request URL. Install the app in your workspace.
  6. Type the command in a channel the app is in, followed by a question.

How to use it

Type the command, a space and your question. Wait a moment. The answer appears in the channel as a new message that repeats your question. Ask a follow-up, and the agent remembers the thread. Nothing to restart. Each person has a thread of their own in each channel.

What to change for a different result
To changeWhere
The assistant’s role and toneThe system message in Agent
The modelGoogle Gemini Chat Model
How much it remembersThe context window length in Window Buffer Memory
The layout of the replyThe text of Send response back to slack channel
The address Slack callsWebhook to receive message

Example

A support lead runs a Slack app for her team. She types the command in the support channel and asks for a polite way to tell a customer that a refund takes five days.

A moment later the app posts a message that mentions her, repeats the question and gives a short, friendly draft, which she copies into the customer’s ticket after a small edit. She asks for a shorter version in the same channel. The agent knows what she means, because it kept the last exchange. A colleague who asks something else gets a separate thread.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A slash command is a Slack shortcut that starts with a slash. A webhook is an address that another service can call. An agent is a model that can also use tools. Here it only talks.

For experts. The webhook acknowledges Slack at once, and the agent’s answer is posted by a separate call.

Where to look closer
NodeWhat it doesWhat to know
Webhook to receive messageReceives the command as a form postIt answers on receipt and checks nothing, so Slack’s signature is not verified
AgentAnswers the command text with the Gemini modelIt has no tool connected, and a command with no text sends an empty prompt
Window Buffer MemoryKeeps the last 10 exchanges for each person and channelThe session key is the channel id and the user id, and the store is n8n’s own memory
Send response back to slack channelPosts the question and the answerThe channel comes from the request, so the app must be in it or hold chat:write.public

Good to know

The notes come from Slack, Google and n8n pages and source read on 12 November 2026, and nothing was run.

  • Not run: no command was typed, no Gemini call was made and no Slack post was sent
  • Repairs: the original model name, models/gemini-1.5-flash-latest, is no longer listed by Google, so the node now names models/gemini-3.6-flash. The agent moved from the deprecated Conversational Agent, which n8n removes in version 3, to the Tools Agent. The memory key was Slack’s verification token, which is the same for everyone, and it is now the channel id and the user id. The original author’s company name was removed from the prompt and the reply, and the reply mentions the asker by id because Slack has phased out user_name
  • Access: nothing checks who calls the webhook. Slack signs its requests and this file does not verify the signature, so keep the address private or add a check
  • Memory: it lives in n8n’s own process, a restart clears it, and an hour without use ends a session. It does not suit queue mode
  • Tools: the agent has no tool connected. n8n’s agent code does not require one, but that was not tried
  • Slack: the reply is a new message, so the app must be in the channel or hold chat:write.public. A command with no text sends an empty prompt, which the model may reject
  • Your data: the question goes to Google, and the question and the answer go to Slack
  • Credentials: the JSON holds none

README and files

README

Slack slash command answered by a Gemini agent with memory

An n8n workflow that answers a Slack slash command. Someone types the command and a question. An AI agent on a Google
Gemini model writes the answer, remembers the last few exchanges, and posts the reply in the same channel.

What is inside

  • workflow.json: the workflow as n8n exports it, 5 nodes and 5 sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The model node named models/gemini-1.5-flash-latest. Google's deprecations and models pages, read on 12 November 2026,
    list no Gemini 1.5 model at all. They also deprecate gemini-2.5-flash, whose calls route to another model from
    1 December 2026. The node now names models/gemini-3.6-flash, which Google lists with no shutdown date announced.
  • The agent was an Agent node of version 1, which defaults to the Conversational Agent. n8n's own notice on that mode says
    it is deprecated and is removed in n8n v3. The agent is now the Tools Agent (node version 1.7), with its prompt taken
    from the command text.
  • The memory used the token field of the Slack request as its session key. Slack's documentation calls that field a
    deprecated verification token that identifies the app, so every person in every channel would share one conversation. The
    key is now the channel id and the user id, which gives each person a thread in each channel.
  • The system message, the reply text and the sender name carried the original author's company name. The system message
    is reworded, the reply says Assistant:, and Send as User is blank. A custom sender name needs the
    chat:write.customize scope, and a blank one does not.
  • The reply began with user_name, which Slack says has been phased out. It now mentions the asker by user id.

Before you start

  • An n8n instance reachable from the internet over https, on n8n Cloud or your own server.
  • A Google Gemini API key.
  • A Slack app with a slash command and a bot token. The token needs the chat:write scope. The app must be in the channel,
    or also hold chat:write.public.

Set it up

  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Google Gemini (PaLM) API credential with your key to Google Gemini Chat Model.
  3. Add a Slack API credential with your bot token to Send response back to slack channel.
  4. Save the workflow and switch it on. Copy the production address of Webhook to receive message, which ends in
    /webhook/slack-bot.
  5. In your Slack app, add a slash command and paste that address as its request URL. Install the app in your workspace.
  6. Type the command in a channel the app is in, followed by a question.

How a run goes

  1. Slack sends the command to Webhook to receive message as a form post. The webhook answers on receipt, so Slack gets its
    reply inside three seconds.
  2. Agent takes the text of the command as its prompt. Google Gemini Chat Model writes the answer. Window Buffer Memory
    hands the agent the last 10 exchanges of that person in that channel.
  3. Send response back to slack channel posts the question and the answer as a new message in the channel the command came
    from.

Change the look

  • The assistant's role and tone: the system message in Agent.
  • The model: Google Gemini Chat Model.
  • How much it remembers: the context window length in Window Buffer Memory.
  • The layout of the reply: the text of Send response back to slack channel.
  • More power: connect tools or data sources to Agent.

Good to know

  • The facts below come from Slack, Google and n8n pages and source read on 12 November 2026. Nothing was run: no command,
    no Gemini call and no Slack post.
  • Nothing checks who calls the webhook. Slack signs its requests with a signing secret, and this file does not verify it.
    Anyone who learns the address can make the bot post, so keep it private or add a check.
  • The memory lives in n8n's own process. A restart clears it, and n8n clears a session after an hour without use. It does
    not suit queue mode.
  • The agent has no tool connected. n8n's agent code does not ask for one, but that was not tried here.
  • A command typed with no text sends an empty prompt, which the model may reject.
  • The reply goes out as a new message, not as Slack's immediate answer. If the app is not in the channel and has no
    chat:write.public, the post fails.
  • Your data: the question goes to Google, and the question and answer go to Slack.
  • Credentials: the JSON holds none.
Files
NOTICE.md  606 B
README.md  4 KB
workflow.json  6 KB

3 files, 11 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Productivity

See all in Productivity

Generates short 480P videos from a text prompt with the small 1.3B Wan2.1 model, packaged for the diffusers library. Runs on a consumer graphics card with abou…

New

Dulu Malayalam ASR

serendipitylabs · Kit

Turns spoken Malayalam into text on a CPU or a CUDA GPU, as an early research release from Serendipity Labs. For people who want draft transcripts of short, cl…

New

Turns plain home commands such as turn off the TV into structured tool calls, checking device states first. A 350M model for smart home builders and tinkerers.

New