← All N8N workflows
AI & researchAgentChat TriggerCodeAnthropic Chat ModelNotion

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.

Workflow preview
IntegrationNotionNotionTransformReturn success to chatEdit FieldsTransformAuto-fixing OutputParserOutput Parser AutofixingAI & modelsAnthropic Chat ModelAnthropic Chat ModelTransformSet schema for evalEdit FieldsTransformReturn error to chatEdit FieldsAI & modelsAnthropic Chat Model1Anthropic Chat ModelTransformstandardize schemaEdit FieldsCodeSimplify propertiesobjectCodeTransformStructured OutputParserOutput Parser StructuredCodeSet input dataCodeTransformSet schem for rerunEdit FieldsTransformAdd feedback promptEdit FieldsRoutingCheck for WF JSONerrorsSwitchAI & modelsGenerate Workflow AgentAgentAI & modelsAnthropic Chat Model2Anthropic Chat ModelTriggerWhen chat messagereceivedChat TriggerAI & modelsValid n8n workflowJSON?Text Classifier

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
NotionIntegrationNotiondatabase
Return success to chatTransformEdit FieldsSee node parameters
Auto-fixing Output ParserTransformOutput Parser AutofixingSee node parameters
Anthropic Chat ModelAI & modelsAnthropic Chat ModelSee node parameters
Set schema for evalTransformEdit FieldsSee node parameters
Return error to chatTransformEdit FieldsSee node parameters
Anthropic Chat Model1AI & modelsAnthropic Chat ModelSee node parameters
standardize schemaTransformEdit FieldsSee node parameters
Simplify properties objectCodeCodeSee node parameters
Structured Output ParserTransformOutput Parser StructuredSee node parameters
Set input dataCodeCodeSee node parameters
Set schem for rerunTransformEdit FieldsSee node parameters
Add feedback promptTransformEdit FieldsSee node parameters
Check for WF JSON errorsRoutingSwitchSee node parameters
Generate Workflow AgentAI & modelsAgentSee node parameters
Anthropic Chat Model2AI & modelsAnthropic Chat ModelSee node parameters
When chat message receivedTriggerChat TriggerSee node parameters
Valid n8n workflow JSON?AI & modelsText ClassifierSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

Watch a quick set up video 👇

Watch a quick set up video 👇

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.

More in AI & research