Skip to main content

AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings

Workflow preview

Workflow preview
100%
AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Build your own AI Prompt Hub inside n8n. This template lets ChatGPT automatically search your saved prompts in Notion using semantic embeddings from HuggingFace. Each time a user sends a message, t...

Best for

  • Internal Wiki automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.webhook, n8n-nodes-base.notion, n8n-nodes-base.httprequest, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Yahor Dubrouski.

Original n8n.io source

1.1 Workflow description

Title
AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings
Workflow name
AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings

Overview

Build your own AI Prompt Hub inside n8n.
This template lets ChatGPT automatically search your saved prompts in Notion using semantic embeddings from HuggingFace. Each time a user sends a message, the workflow finds the most relevant prompt based on meaning - not keywords.

Perfect for developers who maintain dozens of prompts and want ChatGPT to pick the right one automatically.

Key Features

  • 🔍 Semantic Prompt Search - Finds the best prompt using HuggingFace embeddings
  • đź§  AI Agent Integration - ChatGPT automatically calls the prompt-search workflow
  • 📚 Notion Prompt Database - Store unlimited prompts with auto-generated embeddings
  • ⚡ Automatic Embedding Sync - Regenerates vectors when prompts change

This template is ideal for:

  • AI automations
  • Prompt engineering
  • DevOps and backend engineers who reuse prompts
  • Teams managing large prompt libraries

How it works

  1. The user sends any message to the ChatGPT interface
  2. The n8n AI Agent calls a sub-workflow that performs semantic search in Notion
  3. HuggingFace converts both the message and saved prompts into vector embeddings
  4. The workflow returns the most similar prompt, which ChatGPT can use automatically

Setup Instructions (15–20 minutes)

  1. Import this template into your n8n instance
  2. Set credentials for Notion, OpenAI, and HuggingFace
  3. Create a Notion database with:
    • Prompt (Text)
    • Embeddings (Text)
    • Checksum (Text)
  4. Paste your Notion database ID in:
    • “Get All Prompts”
    • “On Page Update”
    • “On Page Create”
    • “Get All Prompts for Search”
  5. Enable the workflow and open the URL from “When chat message received” to start chatting
  6. Type any request - the system will search for a matching prompt automatically

Documentation & Demo

Full documentation and examples:
https://github.com/YahorDubrouski/ai-planner/blob/main/documentation/prompt-hub/README.md

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 5 - Embeddings - Sync All

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 6 - Get All Prompts

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 7 - Get Embeddings

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Prepare Update Body

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - On Page Update

Type / Role
n8n-nodes-base.notionTrigger - notionTrigger
Config choices
Version 1

Block 10 - On Page Create

Type / Role
n8n-nodes-base.notionTrigger - notionTrigger
Config choices
Version 1

Block 11 - Get Question Embeddings

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Get All Prompts for search

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 13 - Find a prompt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Search a Prompt

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.2

Block 15 - Generate Checksum

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - If Embeddings Update Needed

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 17 - Save Embeddings + Checksum

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Search Entrypoint

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 20 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings
Complexity advanced
Nodes 22
Categories Internal Wiki, AI RAG
Author Yahor Dubrouski
Published 24 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11194/11194.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI prompt hub (Notion + ChatGPT): auto-find the right prompt with embeddings do?

Build your own AI Prompt Hub inside n8n. This template lets ChatGPT automatically search your saved prompts in Notion using semantic embeddings from HuggingFace. Each time a user sends a message, t...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.