notion knowledge base ai assistant
Configured with Agent, Chat Trigger, Anthropic Chat Model, Notion, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Integration
- Transform
- AI & models
- Code
- Routing
- Trigger
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Notion | Integration | Notion | database |
| Return success to chat | Transform | Edit Fields | See node parameters |
| Auto-fixing Output Parser | Transform | Output Parser Autofixing | See node parameters |
| Anthropic Chat Model | AI & models | Anthropic Chat Model | See node parameters |
| Set schema for eval | Transform | Edit Fields | See node parameters |
| Return error to chat | Transform | Edit Fields | See node parameters |
| Anthropic Chat Model1 | AI & models | Anthropic Chat Model | See node parameters |
| standardize schema | Transform | Edit Fields | See node parameters |
| Simplify properties object | Code | Code | See node parameters |
| Structured Output Parser | Transform | Output Parser Structured | See node parameters |
| Set input data | Code | Code | See node parameters |
| Set schem for rerun | Transform | Edit Fields | See node parameters |
| Add feedback prompt | Transform | Edit Fields | See node parameters |
| Check for WF JSON errors | Routing | Switch | See node parameters |
| Generate Workflow Agent | AI & models | Agent | See node parameters |
| Anthropic Chat Model2 | AI & models | Anthropic Chat Model | See node parameters |
| When chat message received | Trigger | Chat Trigger | See node parameters |
| Valid n8n workflow JSON? | AI & models | Text Classifier | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
notionApi
Workflow notes
Generate new workflow version for specific notion db schema
Generate new workflow version for specific notion db schema
Input a Notion database URL and get an AI Assistant chatbot workflow for it based on this template: https://n8n.io/workflows/2413-notion-knowledge-base-ai-assistant/
Project in notion: https://www.notion.so/n8n/Chat-with-notion-database-84eec91b74dd4e36ba97edda17c2c306
Set input data
This allows different routes to input into our agent (e.g. the retry branch). In the AI Agent, we can use a relative $json reference for data, since it's always the same input schema going in.
#1 Serve chat, get URL from user, pull new notion DB schema
#1 Serve chat, get URL from user, pull new notion DB schema
Uses n8n Chat trigger. Notion node will fail if an invalid URL is used, or if n8n doesn't have access to it. Also attempts to strip non URL text input. Simplifies notion DB outputs for more efficient token usage in AI Agent.
#2 GenAI step
#2 GenAI step
Takes 2 inputs: original workflow template and new Notion database details from #1
#3 Does the new workflow look right?
#3 Does the new workflow look right?
Checks for previously identified cases (e.g. LLM outputs placeholder for certain values) then does general LLM check on whether it looks like valid n8n workflow JSON.
Check for WF JSON errors
Placeholder jsonBody in tool - this means the 'Search notion database' tool got [object Object] as it's value (happening ~25% of the time)
#4 Respond to Chat trigger
#4 Respond to Chat trigger
Each response to the chat trigger is one run. Data of the last node that runs in the workflow is sent to chat trigger, like Return success to chat
notion knowledge base ai assistant
notion knowledge base ai assistant
Purpose and structure
This folder contains the notion knowledge base ai assistant workflow. Its executable nodes use agent, chatTrigger, code, lmChatAnthropic, notion, outputParserAutofixing, outputParserStructured, set, switch, textClassifier. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When chat message received
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Stickynote/0574_Stickynote_Notion_Create_Triggered.json MIT; preserve source notices.