Skip to content
FlowHubFluxonLab
A
AI Automationfree

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

by Redowan Ahmed Farhanadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentDDefault Data LoaderEmbeddings OpenAIEmbeddings OpenAIHTTP RequestHTTP RequestOpenAIOpenAI Chat ModelOpenAI Chat ModelPostgres Chat MemoryPostgres Chat MemoryPostgres PGVector StorePostgres PGVector StoreRecursive Character Text SplitterRecursive Character Text SplitterTelegramTelegramVector Store Question Answer ToolVector Store Question Answer Tool
Share Post Share
MaWhen clicking ‘Test workflow’When clicking ‘…HRHTTP RequestEFExtract from FileExtract from Fi…VSCreate HR PoliciesCreate HR Polic…Embeddings OpenAIEmbeddings Open…DDDefault Data LoaderDefault Data Lo…TSRecursive Character Text SplitterRecursive Chara…Telegram TriggerSwVerify Message TypeVerify Message …OpenAITelegram1Unsupported Message TypeUnsupported Mes…AgAI AgentOpenAI Chat ModelOpenAI Chat Mod…MPPostgres Chat MemoryPostgres Chat M…TVAnswer questions with a vector storeAnswer question…VSPostgres PGVector StorePostgres PGVect…OpenAI Chat Model1OpenAI Chat Mod…Embeddings OpenAI1Embeddings Open…TelegramSeEdit Fields123456
1/5
FLOWS
STEPS · 6
Run manually by an operator

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 Postgres PGVector vector store. How it works Manually runs once to download an HR policy PDF over HTTP and extract its text. Splits the extracted policy text into chunks, generates OpenAI embeddings, and inserts the vectors into a Postgres PGVector store. Triggers on new Telegram messages sent to your bot. Routes incoming Telegram updates by type, sending text directly to the assistant, transcribing voice messages with OpenAI, or replying that other formats are unsupported. Uses an OpenAI chat model with Postgres-backed chat memory and a PGVector retrieval tool to answer questions grounded in the stored policy content. Sends the final answer back to the user in Telegram. Setup Add an OpenAI API key for embeddings, chat completions, and audio transcription. Set up a Postgres database with the PGVector extension enabled and add the Postgres credentials for both the vector store and chat memory.

Tags

n8nreference-onlyagentdocument-default-data-loaderembeddings-open-ailm-chat-open-aimemory-postgres-chatopen-aitelegramtext-splitter-recursive-character-text-splittertool-vector-storevector-store-pgvector
Connects
AAI AgentDDefault Data LoaderembeddingsopenaiEmbeddings OpenAIWHTTP RequestOpenAIopenaichatmodelOpenAI Chat Model
CategoryAI Automation
Triggermanual
Complexityadvanced
Nodes21
AddedJun 30, 2026

Related workflows

See all AI Automation
ACDembeddingsopenai
free

Answer Slack knowledge base questions with Notion, Pinecone, and OpenAI

Quick overview This workflow syncs an internal Notion knowledge base to Pinecone on a daily schedule, then runs a Slack bot that answers questions in a specific channel using Pinecone retrieval and an OpenAI chat model, replying in a thread with citations back to the source Notion pages. How it works Runs on a daily schedule to sync your Notion knowledge base into a Pinecone vector index. Fetches all pages from a specified Notion database and then pulls each page’s full block content (including nested blocks). Combines each page’s blocks into a single document and attaches metadata such as the Notion title, URL, and last edited time. Splits each document into overlapping text chunks, generates OpenAI embeddings, and inserts them into Pinecone while clearing and rebuilding the target namespace. Triggers when a new message is posted in the configured Slack channel and ignores bot/system messages to prevent reply loops. Uses an OpenAI-powered agent that always queries Pinecone for relevant chunks (including source metadata) and generates an answer in the user’s language. Posts the response back to Slack as a threaded reply, including cited Notion sources. Setup Create a Notion interna

by DigitalCube.AI
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
DhtmlWopenaichatmodel
free

Scrape and summarize webpages with AI

This workflow integrates both web scraping and NLP functionalities. It uses HTML parsing to extract links, HTTP requests to fetch essay content, and AI-based summarization using GPT-4o. It's an excellent example of an end-to-end automated task that is not only efficient but also provides real value by summarizing valuable content. Note that to use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team