Templates / Generate and deploy Notion chat assistants with OpenAI and n8n API

Generate and deploy Notion chat assistants with OpenAI and n8n API

Ready for 3.0

by Dr. Firas ✓ · 36 views · created 2026-07-25 · Internal Wiki, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 24 nodes and runs when a chat message arrives. Along the way it connects Notion and OpenAI Chat Model.

How it runs

Trigger: When a chat message arrives.

  1. Configuration (Edit Fields (Set)): sets 6 fields: notion_database_input, openai_model, fixer_model…
  2. Get Notion Database Schema (Notion): work with database
  3. Standardize Database Schema (Edit Fields (Set)): sets 5 fields: inputDatabase.id, inputDatabase.url, inputDatabase.public_url…
  4. Reply: Invalid Notion URL (Edit Fields (Set)): sets 1 field: output
  5. Simplify Schema Properties (Code): runs custom JavaScript code
  6. Prepare Agent Input (Code): runs custom JavaScript code
  7. Generate Assistant Workflow (AI Agent): runs an AI agent, with model: OpenAI Model (Generator); output parser: Structured Output Parser
  8. Extract Generated Workflow (Edit Fields (Set)): sets 4 fields: generatedWorkflow, searchNotionDBJsonBody, inputDatabase…
  9. Check for Placeholder Bug (Switch): routes items into 1 branches
  10. Merge: merges the data from its input branches

…plus 9 more steps. See the full node list below.

Services it uses

NotionOpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

Quick overview This workflow takes a Notion database URL via n8n Chat, uses Notion and OpenAI to generate a tailored Notion-search chat assistant workflow, validates the generated n8n JSON, and then deploys the new workflow to your n8n instance via the n8n…

Excerpt from Dr. Firas's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.