n8n

How to Sync Notion to Supabase Support Chat?

Turn your Notion pages into a live support chat that answers questions with context. Great for help centers, internal wikis, or onboarding docs that change often.

Here is how it runs end to end. A Notion event or a one minute schedule finds pages that were just edited in your Knowledge Base. Each page is processed one by one to avoid double work. Old vectors for that page are removed from Supabase first, so stale answers do not appear. The page content and nested blocks are pulled, merged into one clean text, then split into 500 token chunks with adjustable overlap for better search. OpenAI creates embeddings for each chunk and stores them in a Supabase vector table with the page id and name. A public chat endpoint receives questions and uses a vector retriever plus an OpenAI chat model to return focused answers based on the most relevant chunks.

Setup needs Notion access to the database, a Supabase project with a vector store, and an OpenAI API key. Edits in Notion sync in about one minute, so answers stay current. Teams use it to deflect repeated questions, provide instant guidance, and keep support docs in one place.

What are the key features?

  • Notion Trigger or a one minute Schedule finds pages updated in a chosen database.
  • Limit and Loop nodes process items safely one at a time to avoid duplicate runs.
  • Fetch nested Notion blocks and combine them into a single clean text body.
  • Token Splitter uses a 500 token chunk size with adjustable overlap for better retrieval.
  • OpenAI Embeddings create vectors for each chunk and store them in Supabase with page metadata.
  • Chat endpoint receives questions and runs a Retrieval QA chain powered by an OpenAI chat model.
  • Vector Store Retriever pulls the most relevant chunks from Supabase for accurate answers.
  • Automatic cleanup removes older vectors tied to the same page id to keep the index consistent.

What are the benefits?

  • Reduce answer search time from minutes to seconds by asking a chat that knows your Notion pages.
  • Keep answers fresh with near real time sync of edits from Notion in about one minute.
  • Prevent stale or duplicate results by deleting old embeddings before reindexing each page.
  • Handle large knowledge bases by splitting content into 500 token chunks for stronger matches.
  • Connect Notion, OpenAI, and Supabase without manual export or copy paste.

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 Notion, place all articles in one database and note the database ID. Share the database with your Notion integration so n8n can read pages.
  4. In the n8n credentials manager, open the Notion credential. If none exists, double click any Notion node, choose Create new credential, and follow the on screen steps to connect your Notion workspace.
  5. Get your OpenAI API key from your OpenAI account. In n8n, open the Embeddings OpenAI or OpenAI Chat Model node, choose Create new credential, paste the API key, and save.
  6. In Supabase, create a project and enable a table for vector storage named documents. Copy the project URL and service role key. In n8n, open any Supabase node, Create new credential, and enter the URL and key.
  7. Open the Notion Trigger node and select your Knowledge Base database. Keep the event set to page updated so only changed pages are processed.
  8. If you prefer polling, open the Schedule Trigger and keep the one minute interval. You may disable the Notion Trigger to avoid duplicate checks.
  9. Check the Delete old embeddings node filter to ensure it uses the page id from the Input Reference. This prevents stale vectors from staying in the index.
  10. Review the Token Splitter chunk size and overlap. Increase overlap for more accurate results while staying within model token limits.
  11. Turn on the workflow. Edit a Notion page and confirm new rows appear in your Supabase documents table within a minute.
  12. Open the URL from the When chat message received node. Ask a question that should match your updated page and verify the answer includes the latest content.
  13. Troubleshooting: If you see duplicate processing, ensure the Limit nodes are set to 1. If answers look old, confirm the delete filter matches the correct page id and that the Notion Trigger or Schedule is active.

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.