n8n

How to Automate Notion Knowledge Chat Support?

Turn your Notion knowledge base into a chat assistant that answers questions with trusted content. New or edited pages are indexed automatically, so answers stay fresh. Built for support teams and operations that need quick, accurate replies.

Updates arrive from a Notion database event and a safety schedule. The flow gathers every block on the page, joins the text, splits it into 500 token chunks, and adds IDs as metadata. Old vectors are removed in Supabase, then new OpenAI embeddings are saved to a vector store. A public chat endpoint receives questions, retrieves the best chunks from Supabase, and uses an OpenAI chat model to form a clear answer.

You will need a Notion database, an OpenAI key, and a Supabase project with a documents table. Expect faster answers and less ticket back and forth, often cutting search time from minutes to seconds. Great for product FAQs, internal SOPs, onboarding notes, and team policies.

What are the key features?

  • Captures updates with a Notion event trigger and a backup schedule
  • Retrieves every page block with nested fetch to cover full content
  • Concatenates page text and splits it into 500 token chunks for better search
  • Adds page ID and name as metadata for precise version control
  • Deletes old embeddings in Supabase using a metadata filter before reindexing
  • Creates OpenAI embeddings and stores them in a Supabase vector table
  • Public chat endpoint accepts questions and returns answers
  • Retrieves top matches from Supabase and uses an OpenAI chat model to answer
  • Limit nodes prevent double processing when multiple streams are active
  • Batch loop processes many updated pages without manual work

What are the benefits?

  • Reduce knowledge search time from 10 minutes to under 30 seconds
  • Automate 100 percent of Notion to vector updates after each edit
  • Eliminate duplicate embeddings by clearing old vectors before each save
  • Handle hundreds of pages and many chat users with a scalable vector store
  • Connect Notion, Supabase, and OpenAI in one reliable flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Notion, OpenAI and Supabase. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Notion credential. Double click any Notion node, choose 'Create new credential', and follow the on screen steps. In Notion, share the target database with this integration so it has read access.
  4. Create an OpenAI credential. Double click the OpenAI node, click 'Create new credential', and paste your API key from the OpenAI API page.
  5. Create a Supabase credential. In Supabase, copy the project URL and service role key. In n8n, open the Supabase nodes, choose 'Create new credential', and enter the URL and key.
  6. Open the Notion Trigger node and select your Knowledge Base database. Keep the event for page updates and the poll every minute as configured.
  7. Check the Get updated pages node filter. It uses last edited time equals now minus 1 minute. Keep this in sync with your schedule trigger interval.
  8. Verify Supabase table settings. Ensure the table name is documents and that your schema includes fields for content, metadata, and an embedding vector. The delete step filters by metadata id to remove older chunks.
  9. Adjust the Token Splitter if needed. Chunk size is 500 tokens. Increase overlap for better recall while keeping model limits in mind.
  10. Confirm the OpenAI Chat Model is set to your preferred model. gpt 4o is selected. You can change it if you have different access.
  11. Activate the workflow. Edit a Notion page and confirm new rows appear in Supabase while older rows for that page are removed.
  12. Test the chat endpoint. Copy the public URL from the chat trigger, send a question that exists in your Notion docs, and check the answer quality.
  13. Troubleshoot common issues. If Notion updates are missed, ensure the database is shared with the integration. If Supabase returns 401, recheck the service role key. If answers are weak, increase chunk overlap or retriever results and verify the delete filter matches your metadata id.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Notion

Sign up

Free plan: $0 per member / mo (Public API included)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Supabase

Sign up

Free: $0 / mo — unlimited API requests; 500 MB database; 5 GB bandwidth; 1 GB storage; 50,000 MAUs.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.