Skip to content
Automation Squad
SAISbNMade to order

AI drafting, summaries & agents

Slack @mention → AI agent answering from your Notion wiki

Ask the bot in Slack and get the answer from your own wiki, with the page linked.

Every week the same questions get asked in Slack, and the answers already sit in Notion. The package indexes your Notion wiki into a Supabase vector store and runs an agent that answers @mentions in Slack from those pages only. Replies land in the thread with the page linked. When the wiki does not cover it, the agent says so instead of inventing an answer, and ops, HR and support leads stop being the search engine.

How it works

  1. S

    Trigger

    App mention in any channel the bot has been added to (Slack Events API)

    Slack

  2. S

    Step 1

    Read the thread for context

    Strips the @mention and, when the question sits inside a thread, pulls the earlier messages with conversations.replies so a follow-up keeps its context.

  3. AI

    Step 2

    Embed the question

    The question text goes to OpenAI's embeddings endpoint and comes back as a vector. The model is the same one the wiki was indexed with, so the two sets of numbers are comparable.

  4. Sb

    Step 3

    Find the closest wiki chunks

    A similarity search over the pgvector table returns the five nearest chunks with their Notion page IDs, titles and a score.

  5. AI

    Step 4

    Answer from those chunks only

    An AI Agent node, given only the retrieved chunks and a system prompt that forbids outside knowledge, writes the answer, cites the pages it used, and returns a flag when the chunks do not cover the question.

  6. N

    Step 5

    Fetch the cited page links

    Looks up each cited page ID in Notion to get the current title and URL, so a page renamed since the last index still links correctly.

  7. if

    Step 6

    Route by coverage

    If the agent flagged no coverage, the reply says the wiki has no answer and names the channel to ask instead; otherwise the drafted answer continues.

  8. S

    Step 7

    Reply in the thread

    Posts the answer as a threaded reply under the original message, with the Notion page links listed at the bottom, and logs question, chunks and answer to a Supabase table.

What changes once it runs

  • Answers land in the Slack thread with the Notion page linked, drawn from the wiki and nothing else.
  • Questions the wiki does not cover get a plain not-in-the-wiki reply and a pointer to a person, never a guess.
  • The wiki is re-indexed nightly, so a page edited today answers correctly tomorrow.
  • Follow-up questions in the same thread keep their context.
  • Every question, the chunks used and the answer are logged to a Supabase table, which shows what people ask and where the wiki has gaps.

What you get

  • Two n8n workflow exports: the nightly Notion indexer and the Slack answering agent
  • Supabase SQL for the vector table, the match function and the question log
  • The agent's system prompt as a file, with the refusal rule and the tone section marked for editing
  • Setup guide covering the Slack app manifest, the Notion integration and the Supabase keys
  • Recorded walkthrough of a question going from Slack to answer
  • Thirty days of email support for setup questions

Before you start

  • Notion workspace with an internal integration token, shared with the wiki pages you want indexed
  • Supabase project with the pgvector extension enabled; the free tier works and the setup SQL is included
  • OpenAI API key for embeddings and the chat model
  • A Slack app you can install with app_mentions:read, chat:write and channels:history scopes, and event subscriptions pointed at n8n
  • n8n Cloud, or self-hosted with a public HTTPS URL, because Slack's Events API pushes to a webhook

Built for

Questions before you buy

Will it make things up?
It is instructed to answer only from the retrieved chunks and to say when they do not cover the question, and every retrieval is logged so any answer can be checked against the pages it used. That is a guardrail, not a guarantee. Treat the bot as a first responder and keep a person on the channel.
Can the knowledge base be Google Drive instead of Notion?
Yes. A variant of the indexer that reads Google Docs and PDFs from a Drive folder is in the package. The answering workflow is identical; only the indexer changes. Confluence is not included, but the indexer is three nodes and the guide describes what to swap.
What does it cost to run?
One embedding call and one chat completion per question, both billed by OpenAI at their published rates. The nightly re-index embeds only pages changed since the last run. Supabase's free tier is enough for a company wiki, and the guide shows how to check usage.
Does it need a paid n8n plan?
n8n Cloud on any plan, or self-hosted with a public HTTPS URL, since Slack pushes events to a webhook rather than being polled. Each question is one execution and the nightly index is one more.
Can it answer in a DM instead of a channel?
Yes. Add the im:history scope and the message.im event to the Slack app, set the trigger to listen for messages as well as mentions, and the same workflow answers direct messages. The guide has the extra manifest lines.

Nearby on the shelf

Whole catalog