Notion AI Assistant Generator n8n Workflow Template

n8n workflow template · 18 nodes · Notion

Notion AI Assistant Generator is a free n8n workflow template that starts when a chat message is received and works with Notion and Anthropic Claude. It has 18 nodes, 8 of them AI nodes (Auto-fixing Output Parser, Anthropic Chat Model, Structured Output Parser and AI Agent). The notes inside the workflow say: “Input a Notion database URL and get an AI Assistant chatbot workflow for it based on this template” To run it, you add your own credentials for Notion API.

At a glance

Trigger
Chat Trigger (When chat message received)
Nodes
18
Apps
Notion and Anthropic Claude
AI nodes
8
Credentials
1 type
Category
Spreadsheets, databases and docs

Apps and integrations

  • Notion
  • Anthropic Claude

Node types used

  • Notion
  • Edit Fields (Set)
  • Auto-fixing Output Parser
  • Anthropic Chat Model
  • Code
  • Structured Output Parser
  • Switch
  • AI Agent
  • Chat Trigger
  • Text Classifier

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.

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

Project in notion

#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

Takes 2 inputs: original workflow template and new Notion database details from #1

#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.

#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

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.

Watch a quick set up video

Nodes in this workflow

The 18 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Notion (Notion)
  2. Return success to chat (Edit Fields (Set))
  3. Auto-fixing Output Parser (Auto-fixing Output Parser)
  4. Anthropic Chat Model (Anthropic Chat Model)
  5. Set schema for eval (Edit Fields (Set))
  6. Return error to chat (Edit Fields (Set))
  7. Anthropic Chat Model1 (Anthropic Chat Model)
  8. standardize schema (Edit Fields (Set))
  9. Simplify properties object (Code)
  10. Structured Output Parser (Structured Output Parser)
  11. Set input data (Code)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.
  12. Set schem for rerun (Edit Fields (Set))
  13. Add feedback prompt (Edit Fields (Set))
  14. Check for WF JSON errors (Switch)Placeholder jsonBody in tool - this means the 'Search notion database' tool got [object Object] as it's value (happening ~25% of the time)
  15. Generate Workflow Agent (AI Agent)
  16. Anthropic Chat Model2 (Anthropic Chat Model)
  17. When chat message received (Chat Trigger)
  18. Valid n8n workflow JSON? (Text Classifier)

Credentials you need

  • Notion API – used by Notion

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. 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.
  3. Open each node that shows a warning and select or create its credential.
  4. 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.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us