Templates / Answer support questions from your docs with Telegram, OpenRouter and pgvector

Answer support questions from your docs with Telegram, OpenRouter and pgvector

Ready for 3.0

by Hamza ✓ · 14 views · created 2026-10-20 · Support Chatbot, AI RAG

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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 28 nodes and runs on Telegram events (message). Along the way it connects Telegram, Postgres PGVector Store, Embeddings OpenAI and Postgres and 2 more.

How it runs

Trigger: On Telegram events (message).

  1. Agent Settings (Edit Fields (Set)): sets 6 fields: businessName, supportChatId, minSimilarity…
  2. Search Knowledge Base (Postgres PGVector Store): searches the Postgres PGVector Store vector store, with embeddings: Embeddings for Search
  3. Score Retrieval Confidence (Code): runs custom JavaScript code
  4. Prepare Agent Error (Edit Fields (Set)): sets 4 fields: workflow, node, message…
  5. Is Retrieval Confident Enough? (If): checks a condition and branches into true / false
  6. Log Error in Postgres (Postgres): run a query
  7. Answer From Your Docs (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Knowledge Base Search Tool); memory: Remember This Chat in Postgres
  8. Tell Customer a Human Will Reply (Telegram): uses Telegram
  9. Alert Support Team About Error (Telegram): uses Telegram
  10. Check Agent Certainty (Code): runs custom JavaScript code

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

Services it uses

TelegramPostgres PGVector StoreEmbeddings OpenAIPostgresOpenRouter Chat ModelPostgres Chat Memory

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 turns a Telegram bot into an AI support agent that answers from your Postgres pgvector knowledge base using OpenRouter, and hands off to a human support chat when retrieval or the agent is not confident, while logging Q&A and…

Excerpt from Hamza'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.