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

> 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 errors to Postgres. How it works 1. Triggers when a customer sends a new message to your Telegram bot. 2. Searches your Postgres pgvector knowledge base using OpenAI embeddings and scores the best match against a minimum similarity threshold. 3. If retrieval is confident, uses an OpenRouter chat model with Postgres chat memory and a pgvector search tool to answer strictly from your documents. 4. Checks whether the agent responded confidently (not empty and not “HANDOFF”) and sends the answer back to the customer in Telegram. 5. If retrieval or the agent is not confident, notifies the customer that a human will reply and sends the question to a Telegram support chat with a “Respond” button. 6. If the support team replies within 24 hours

- **Domain**: `n8n-workflow-21398.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/21398
- Page (HTML): https://agenstry.com/agents/n8n-workflow-21398.n8n.io
- Documentation: https://n8n.io/workflows/21398
