Answer HR and IT policy questions on Telegram with OpenAI and Postgres PGVector
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
Related workflows
See all AI Automation→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
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.
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.