Templates / Answer HR and IT policy questions on Telegram with OpenAI and Postgres PGVector

Answer HR and IT policy questions on Telegram with OpenAI and Postgres PGVector

Needs changes

by Redowan Ahmed Farhan ✓ · 22 views · created 2026-06-30 · Internal Wiki, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 21 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Postgres PGVector Store, Embeddings OpenAI, Telegram and OpenAI and 3 more. It also calls s3.amazonaws.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. HTTP Request: calls s3.amazonaws.com
  2. Verify Message Type (Switch): routes items into 2 branches
  3. Extract from File: extracts data from a file (pdf)
  4. Edit Fields (Edit Fields (Set)): sets 1 field: text
  5. Telegram: work with file
  6. Unsupported Message Type (Telegram): uses Telegram
  7. Create HR Policies (Postgres PGVector Store): stores documents in the Postgres PGVector Store vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
  8. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Answer questions with a vector store); memory: Postgres Chat Memory
  9. OpenAI: transcribe (audio)
  10. Telegram: uses Telegram

Services it uses

Postgres PGVector StoreEmbeddings OpenAITelegramOpenAIOpenAI Chat ModelPostgres Chat MemoryVector Store Question Answer

HTTP calls to: s3.amazonaws.com

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (16)

From the author

Quick overview This workflow builds a searchable HR policy knowledge base from a PDF and runs a Telegram helpdesk bot that answers employee questions from that content, handling both text messages and voice notes via OpenAI transcription and retrieval from a…

Excerpt from Redowan Ahmed Farhan'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.