Back to Integrations
integrationNotion node
integrationSupabase node

Notion and Supabase integration

Save yourself the work of writing custom integrations for Notion and Supabase and use n8n instead. Build adaptable and scalable Productivity, and Data & Storage workflows that work with your technology stack. All within a building experience you will love.

How to connect Notion and Supabase

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Notion and Supabase integration: Create a new workflow and add the first step

Step 2: Add and configure Notion and Supabase nodes

You can find Notion and Supabase in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Notion and Supabase nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Notion and Supabase integration: Add and configure Notion and Supabase nodes

Step 3: Connect Notion and Supabase

A connection establishes a link between Notion and Supabase (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Notion and Supabase integration: Connect Notion and Supabase

Step 4: Customize and extend your Notion and Supabase integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Notion and Supabase with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Notion and Supabase integration: Customize and extend your Notion and Supabase integration

Step 5: Test and activate your Notion and Supabase workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Notion to Supabase or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Notion and Supabase integration: Test and activate your Notion and Supabase workflow

Upsert huge documents in a vector store with Supabase and Notion

Purpose

This workflow adds the capability to build a RAG on living data. In this case Notion is used as a Knowledge Base. Whenever a page is updated, the embeddings get upserted in a Supabase Vector Store.

It can also be fairly easily adapted to PGVector, Pinecone, or Qdrant by using a custom HTTP request for the latter two.

Demo

How it works

A trigger checks every minute for changes in the Notion Database. The manual polling approach improves accuracy and prevents changes from being lost between cached polling intervals.
Afterwards every updated page is processed sequentially
The Vector Database is searched using the Notion Page ID stored in the metadata of each embedding. If old entries exist, they are deleted.
All blocks of the Notion Database Page are retrieved and combined into a single string
The content is embedded and split into chunks if necessary. Metadata, including the Notion Page ID, is added during storage for future reference.
A simple Question and Answer Chain enables users to ask questions about the embedded content through the integrated chat function

Prerequisites

To setup a new Vector Store in Supabase, follow this guide
Prepare a simple Database in Notion with each Database Page containing at least a title and some content in the blocks section. You can of course also connect this to an existing Database of your choice.

Setup

Select your credentials in the nodes which require those
If you are on an n8n cloud plan, switch to the native Notion Trigger by activating it and deactivating the Schedule Trigger along with its subsequent Notion Node
Choose your Notion Database in the first Node related to Notion
Adjust the chunk size and overlap in the Token Splitter to your preference
Activate the workflow

How to use

Populate your Notion Database with useful information and use the chat mode of this workflow to ask questions about it. Updates to a Notion Page should quickly reflect in future conversations.

Nodes used in this workflow

Popular Notion and Supabase workflows

+4

Upsert huge documents in a vector store with Supabase and Notion

Purpose This workflow adds the capability to build a RAG on living data. In this case Notion is used as a Knowledge Base. Whenever a page is updated, the embeddings get upserted in a Supabase Vector Store. It can also be fairly easily adapted to PGVector, Pinecone, or Qdrant by using a custom HTTP request for the latter two. Demo How it works A trigger checks every minute for changes in the Notion Database. The manual polling approach improves accuracy and prevents changes from being lost between cached polling intervals. Afterwards every updated page is processed sequentially The Vector Database is searched using the Notion Page ID stored in the metadata of each embedding. If old entries exist, they are deleted. All blocks of the Notion Database Page are retrieved and combined into a single string The content is embedded and split into chunks if necessary. Metadata, including the Notion Page ID, is added during storage for future reference. A simple Question and Answer Chain enables users to ask questions about the embedded content through the integrated chat function Prerequisites To setup a new Vector Store in Supabase, follow this guide Prepare a simple Database in Notion with each Database Page containing at least a title and some content in the blocks section. You can of course also connect this to an existing Database of your choice. Setup Select your credentials in the nodes which require those If you are on an n8n cloud plan, switch to the native Notion Trigger by activating it and deactivating the Schedule Trigger along with its subsequent Notion Node Choose your Notion Database in the first Node related to Notion Adjust the chunk size and overlap in the Token Splitter to your preference Activate the workflow How to use Populate your Notion Database with useful information and use the chat mode of this workflow to ask questions about it. Updates to a Notion Page should quickly reflect in future conversations.

Provide Real-Time Updates for Notion Databases via Webhooks with Supabase

Purpose This enables webhooks for nearly realtime updates (every 5 seconds) from Notion Databases. Problem Notion does not offer webhooks. Even worse, the “Last edited time” property, we could use for polling, only updates every minute. This gives us a polling interval only as low as 2 minutes and we still need to implement a comparing mechanism to detect changes. Solution This workflow caches states in between while doing efficient polling & comparing. It brings down the update latency from 2 minutes to 5 seconds and also provides the output of the changes only. Demo How it works Database Pages are frequently polled while filtered by a last modified time stamp for more efficiency Retrieved pages get compared with previously cached versions in Supabase Only new and changed pages are pushed to a registered webhook Setup Create a new project in Supabase and import the DB schema (provided through Gumroad) Add a "Last edited time" property to your Notion Database, if it has none yet Define the dynamically generated settings_id from the settings table (Supabase) in the Globals node Define the Notion Database URL in the Globals node Define your custom Webhook URL in the last node where the results should be pushed to It is recommended to call this workflow using this template to prevent simultaneous workflow executions Set the Schedule Trigger to every 5 seconds or less frequent More detailed instructions provided within the workflow file and the illustrated instructions provided during the download Example output [ { "action": "changed", "changes": { "property_modified_at": "2024-06-04T17:59:00.000Z", "property_priority": "important" }, "data": { "id": "ba761e03-7d6d-44c2-8e8d-c8a4fb930d0f", "name": "Try out n8n", "url": "https://www.notion.so/Try-out-n8n-ba761e037d6d44c28e8dc8a4fb930d0f", "property_todoist_id": "", "property_id": "ba761e037d6d44c28e8dc8a4fb930d0f", "property_modified_at": "2024-06-04T17:59:00.000Z", "property_status": "Backlog", "property_priority": "important", "property_due": { "start": "2024-06-05", "end": null, "time_zone": null }, "property_focus": false, "property_name": "Try out n8n" }, "updated_at": "2024-06-04T17:59:42.144+00:00" } ]

Build your own Notion and Supabase integration

Create custom Notion and Supabase workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Notion supported actions

Append After
Append a block
Get Child Blocks
Get many child blocks
Get
Get a database
Get Many
Get many databases
Search
Search databases using text search
Get
Get a database
Get Many
Get many databases
Create
Create a pages in a database
Get
Get a page in a database
Get Many
Get many pages in a database
Update
Update pages in a database
Create
Create a pages in a database
Get Many
Get many pages in a database
Update
Update pages in a database
Create
Create a page
Get
Get a page
Search
Text search of pages
Archive
Archive a page
Create
Create a page
Search
Text search of pages
Get
Get a user
Get Many
Get many users

Supabase supported actions

Create
Create a new row
Delete
Delete a row
Get
Get a row
Get Many
Get many rows
Update
Update a row

FAQs

  • Can Notion connect with Supabase?

  • Can I use Notion’s API with n8n?

  • Can I use Supabase’s API with n8n?

  • Is n8n secure for integrating Notion and Supabase?

  • How to get started with Notion and Supabase integration in n8n.io?

Need help setting up your Notion and Supabase integration?

Discover our latest community's recommendations and join the discussions about Notion and Supabase integration.
Justin Cheu
Cris A. Works
Martin
Liam Skaff
AyS 0908

Looking to integrate Notion and Supabase in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Notion with Supabase

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon