---
title: "Slack slash command answered by a Gemini agent with memory"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/4153c984-0ef3-4568-addc-598c054c8b1d"
updated: "2026-11-13"
---

# Slack slash command answered by a Gemini agent with memory

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-13. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

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

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Operations | Team leads | Ask quick questions without leaving Slack | A lead types the command and asks how to word a polite reminder to a supplier. |
| Support | Support agents | Draft a first reply to a customer | An agent pastes a customer’s question and gets a draft to edit. |
| Marketing | Marketers | Get a few headline ideas | A marketer asks for five subject lines, then asks for shorter ones. |
| Education | Teachers | Explain a topic in plain words | A 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

### How to set it up

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

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own, reachable over https |
| Google Gemini | An API key |
| Slack | An 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 change | Where |
| --- | --- |
| 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\` |
| The address Slack calls | \`Webhook 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

| Node | What it does | What to know |
| --- | --- | --- |
| \`Webhook to receive message\` | Receives the command as a form post | It answers on receipt and checks nothing, so Slack’s signature is not verified |
| \`Agent\` | Answers the command text with the Gemini model | It has no tool connected, and a command with no text sends an empty prompt |
| \`Window Buffer Memory\` | Keeps the last 10 exchanges for each person and channel | The session key is the channel id and the user id, and the store is n8n’s own memory |
| \`Send response back to slack channel\` | Posts the question and the answer | The 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

```markdown
# 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.
```

## What is in it

3 files, 11 KB, downloaded as a zip.

```text
NOTICE.md  606 B
README.md  4 KB
workflow.json  6 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- 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

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/4153c984-0ef3-4568-addc-598c054c8b1d)
- [Its page on Mindket](https://mindket.com/p/4153c984-0ef3-4568-addc-598c054c8b1d)
