Mindket

Chat over a Notion knowledge base kept fresh in Supabase

Newversion 1 · updated

Overview

An n8n workflow that keeps a Supabase table in step with a Notion database. Edited pages are re-read, cut into chunks and embedded again, and a chat window answers questions from the stored chunks.

Chat over a Notion knowledge base kept fresh in Supabase 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: import the file and publish it
  • Your own n8n server: the same file and steps
  • Notion: a database whose pages people edit, shared with your Notion integration
  • Supabase: a table with a vector column that fits the embedding model

Platform

Connects 3 apps

How it works

Trigger

A page is edited in Notion

It starts every minute and looks in your Notion database for pages edited in the last minute. Each page brings:

  • The page’s id and name
  • All the blocks on the page, nested ones included

Actions

  1. Deletes the old chunks of the page from Supabase
  2. Reads the whole page and joins its text into one piece
  3. Cuts the text into chunks of 500 tokens
  4. Turns the chunks into vectors with OpenAI and stores them in Supabase
  5. Answers a question in the chat window from the closest stored chunks

Result

A Supabase table that mirrors your edited Notion pages, and chat answers built from it

Integrations

What you need before you start.

Notion

Page source

Lists edited pages and reads their blocks.

NeedsA Notion integration token and a database shared with it

OpenAI

Embeddings and answers

Turns chunks into vectors and writes the chat answers.

NeedsAn OpenAI API key

Supabase

Vector store

Stores the chunks and finds the ones closest to a question.

NeedsA Supabase project and a table with a vector column of 1536 dimensions

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
12 steps, starting on a schedule or on a chat message
Not reached
1 node no run reaches: Notion Trigger
AI
2 steps call an AI model: Insert Page Chunks and Question and Answer Chain
Sign-ins
Signs in to: Notion, Supabase and OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 10 of its step types

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

About

What it is

This n8n workflow keeps a copy of a Notion database in Supabase and lets you chat with it. Every minute it looks for pages edited in the last minute. For each one it deletes the old chunks and reads the whole page, nested blocks included. It cuts the text into chunks of 500 tokens, embeds them with OpenAI and stores them. A second part answers questions in n8n’s chat window from the closest stored chunks. Nineteen nodes run it, one of them switched off, beside three sticky notes.

Who it suits

Teams that keep their know-how in Notion and want to ask it questions in plain words. It suits a database that people edit all day, because edits replace the old chunks. Skip it if your pages hold text you do not want sent to OpenAI.

Who uses it, and how
IndustryWho uses itHow they use itExample
SupportHelp desksAsk questions of the help pages that agents keep editingAn agent asks how refunds work and gets an answer built from the refund page.
OperationsOffice teamsAsk about internal rules and checklistsA new hire asks who approves a purchase and gets the page’s answer.
People teamsHRSearch policies in plain wordsA manager asks how many days of leave a role gets.
SoftwareDev teamsAsk about runbooks and decisionsAn engineer asks what to do when the queue backs up.

You need to know n8n’s settings: import a file, add three credentials and prepare a table in Supabase.

Where to use it

Any n8n that can reach Notion, OpenAI and your Supabase project will run it.

  • n8n Cloud: import the file and publish it
  • Your own n8n server: the same file and steps
  • Notion: a database whose pages people edit, shared with your Notion integration
  • Supabase: a table with a vector column that fits the embedding model

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup is three credentials, a database id and a table.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
NotionAn integration token, as a Notion credential in n8n, and a database that is shared with that integration
OpenAIAn API key, added in n8n as an OpenAI credential
SupabaseA project, its host and its secret key as a Supabase credential, and a table named documents with content, metadata and a vector column of 1536 dimensions
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Notion credential and select it in Get Edited Pages and Get Page Blocks. In Get Edited Pages, replace <YOUR_NOTION_DATABASE_ID> with the id of your database, the 32 characters in its link.
  3. In Supabase, make the table named documents. Follow Supabase’s guide to vector columns and n8n’s notes on its Supabase vector store. Mindket did not paste SQL for it.
  4. Add a Supabase credential and select it in Delete Old Chunks, Insert Page Chunks and Search Page Chunks.
  5. Add an OpenAI credential and select it in OpenAI Embeddings and OpenAI Chat Model.
  6. Publish the workflow, edit a page in the database and wait two minutes. Then open the chat window and ask about that page.

How to use it

Leave the workflow published and keep editing pages as usual. Each edited page is replaced in the table within a few minutes. Ask questions in n8n’s chat window at any time.

What to change for a different result
To changeWhere
The databaseGet Edited Pages
How often pages are checkedCheck Every Minute
The chunk sizeToken Splitter
The metadata stored with each chunkLoad Page and Add Metadata
The model that answersOpenAI Chat Model
The tableDelete Old Chunks, Insert Page Chunks and Search Page Chunks

Example

You edit a page called Refund policy, and later you ask the chat a question about it.

Question: How many days do customers have to ask for a refund?

The chat finds the stored chunks of the Refund policy page that sit closest to the question and has the model answer from them.

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. This one copies your Notion pages into a special table and answers questions from it. Start with a few short pages.

For experts. The delete step uses the page id in the metadata of each chunk, so every chunk of a page must carry that id.

Where to look closer
NodeWhat it doesWhat to know
Get Edited PagesLists pages whose last edited time equals one minute agoAn exact time match, which Mindket did not check against Notion’s timestamps
Loop Over ItemsHandles one page at a timeThe loop ends when the last page is stored
Delete Old ChunksRemoves the stored chunks of the pageAlways Output Data is on, so a new page with no old chunks still goes on
Get Page BlocksReads every block of the pageNested blocks are included
Insert Page ChunksStores the chunks with their vectorsThe metadata holds the page id and name
Chat Message ReceivedOpens the chatNot public, so the chat runs inside n8n
Question and Answer ChainAnswers from the closest chunksUses gpt-6-luna and the stored chunks only

Good to know

Pages that are deleted in Notion are not removed from the table.

  • Fixes: gpt-4o retires on 14 January 2027, so the chat model is gpt-6-luna. The embedding step names text-embedding-3-small itself. The loader reads the joined text and no longer embeds the whole item as JSON. The Notion database is a placeholder
  • Chat access: the chat trigger is set to not public. Making it public with no authentication would let anyone spend your OpenAI credit
  • Timing: the edited page filter and the one minute schedule were kept as they were. A page that the filter does not catch in its minute is not picked up later, so test with a few edits
  • Table: the vector column must match the model, and the metadata column must be able to hold the page id
  • Secret key: the Supabase secret key skips row level security, so keep it in n8n and never in a page or a browser
  • Data: the page text goes to OpenAI and to your Supabase project, and the questions go to OpenAI
  • Not run: Mindket did not run it against Notion, OpenAI or Supabase, and did not check a table for it
  • Credentials: the JSON holds none

README and files

README

Chat over a Notion knowledge base kept fresh in Supabase

An n8n workflow that keeps a Supabase table in step with a Notion database. Every minute it looks for pages edited in the last
minute, deletes their old chunks, reads each page again, cuts it into chunks and embeds them with OpenAI. A chat window
answers questions from the stored chunks.

What is inside

  • workflow.json: the workflow as n8n exports it, 22 nodes. Three are sticky notes and one, a Notion trigger, starts switched
    off. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The original used gpt-4o, which retires on 14 January 2027. The chat model is now gpt-6-luna. The chain uses no tools,
    so that model fits.
  • The embedding step now names text-embedding-3-small itself. The older version of the node picked an older model when none
    was named.
  • The step that loads the page text now reads the joined text. Before, it embedded the whole item written out as JSON.
  • The chat trigger was open to anyone with the link. It is now set to not public, so the chat runs inside n8n.
  • The Notion database was private. It is now the placeholder <YOUR_NOTION_DATABASE_ID>.
  • Several nodes were renamed to say what they do, and the names no longer hold spaced hyphens. The wiring is unchanged.
  • Three sticky notes were added in plain words.

Before you start

  • A Notion integration token and a database that is shared with that integration.
  • An OpenAI API key.
  • A Supabase project, its host and its secret key, and a table named documents with content, metadata and a vector column
    of 1536 dimensions. Follow Supabase's guide to vector columns and n8n's notes on its Supabase vector store. Mindket did not
    paste SQL for it and did not check a table for this workflow.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Notion credential and select it in Get Edited Pages and Get Page Blocks. In Get Edited Pages, replace
    <YOUR_NOTION_DATABASE_ID> with the id of your database, the 32 characters in its link.
  3. Make the table in Supabase. Add a Supabase credential and select it in Delete Old Chunks, Insert Page Chunks and
    Search Page Chunks.
  4. Add an OpenAI credential and select it in OpenAI Embeddings and OpenAI Chat Model.
  5. Publish the workflow, edit a page in the database and wait two minutes. Then open the chat window and ask about that page.

How a run goes

  1. Check Every Minute starts the run, and Get Edited Pages lists the pages whose last edited time equals one minute ago.
  2. Input Reference hands the pages to Loop Over Items, which takes one page at a time.
  3. Delete Old Chunks removes the stored chunks whose metadata holds the page id. It always outputs an item, so a new page
    with no old chunks goes on. Keep One Delete Result makes sure only one item continues.
  4. Get Page Blocks reads every block of the page, nested blocks included. Join Blocks Into One Text joins their text into
    the field concatenated_content.
  5. Load Page and Add Metadata wraps the text as a document with the page id and name. Token Splitter cuts it into chunks
    of 500 tokens, OpenAI Embeddings turns them into vectors and Insert Page Chunks stores them. The loop then takes the
    next page.
  6. In the chat, Chat Message Received passes a question to Question and Answer Chain. Search Page Chunks and
    Vector Store Retriever find the closest chunks, and OpenAI Chat Model answers from them.

Change the result

  • The database: Get Edited Pages.
  • How often pages are checked: Check Every Minute. The switched-off Notion Trigger does the same job and can replace it.
  • The chunk size: Token Splitter.
  • The metadata: Load Page and Add Metadata. Keep the id, because the delete step uses it.
  • The model that answers: OpenAI Chat Model.
  • The table: Delete Old Chunks, Insert Page Chunks and Search Page Chunks.

Good to know

  • Pages that are deleted in Notion are not removed from the table.
  • The edited page filter compares the last edited time with the exact time one minute ago. Mindket did not check that against
    Notion's timestamps. A page that the filter does not catch in its minute is not picked up later, so test with a few edits. If pages are missed, change
    the filter or use the switched-off Notion Trigger.
  • The chat trigger is set to not public. Making it public with no authentication would let anyone spend your OpenAI credit.
  • The vector column must match the model, and the metadata column must be able to hold the page id.
  • The Supabase secret key skips row level security. Keep it in n8n and never in a page or a browser.
  • The page text goes to OpenAI and to your Supabase project, and the questions go to OpenAI.
  • Mindket did not run this workflow against Notion, OpenAI or Supabase.
Files
NOTICE.md  611 B
README.md  5 KB
workflow.json  13 KB

3 files, 18 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Productivity

See all in Productivity

Frontend Slides

zarazhangrui · Skill

Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…

New32.3k

IPTV

iptv-org · Kit

Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…

New144k

upscaler

uwg · Kit

Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…

New