At a glance
- Trigger
- Chat Trigger (When chat message received)
- Nodes
- 8
- Apps
- OpenAI and Notion
- AI nodes
- 6
- Credentials
- 2 types
- Category
- Spreadsheets, databases and docs
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Notion knowledge base assistant [v1]
Built as part of the 30 Day AI Sprint by @maxtkacz
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Template set up quickstart video
Written set up steps
- Add a Notion credential to your n8n workspace (follow this Notion guide)
- Duplicate Company knowledge base Notion template to your Notion workspace, then make sure to share the new knowledge base with connection you created in Step 1.
- Add Notion cred to Get database details:Credential to connect with parameter, then to Search notion database:Notion API parameter (same for Search inside database record)
- Add OpenAI credential to Open AI Chat Model node (tested and working with Anthropic Claude 3.5 too)
- In Get database details, select the db you created from Step 2 in Database dropdown.
- Click Chat button to test the workflow. Then Activate it and copy the Chat URL from When chat message received.
FAQ
- In Get database details if you see a The resource you are requesting could not be found error, you need to add your connection to the database (in the Notion app).
- The Get database details pulls most recent Tags and informs AI Agent of them. However this step adds ~250-800ms per run. Watch detailed video to see how to remove this step.
Nodes in this workflow
The 8 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- OpenAI Chat Model (OpenAI Chat Model)
- Search notion database (HTTP Request Tool)
- Get database details (Notion)
- Window Buffer Memory (Window Buffer Memory)
- Search inside database record (HTTP Request Tool)
- Format schema (Edit Fields (Set))
- AI Agent (AI Agent)
- When chat message received (Chat Trigger)
Credentials you need
- Notion API – used by Get database details, Search inside database record and Search notion database
- OpenAI API – used by OpenAI Chat Model
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.