HR & IT Helpdesk Chatbot with Audio Transcription n8n Workflow Template

n8n workflow template · 21 nodes · Postgres

HR & IT Helpdesk Chatbot with Audio Transcription is a free n8n workflow template that starts from the Telegram Trigger node and works with Postgres, OpenAI and Telegram. It has 21 nodes, 12 of them AI nodes (Postgres PGVector Store, OpenAI Embeddings, Default Data Loader and Recursive Character Text Splitter). The notes inside the workflow say: “Begin by importing the PDF documents that contain your internal policies and FAQs—these will become the knowledge base for your Internal Helpdesk Assistant.” To run it, you add your own credentials for OpenAI API, Postgres and Telegram Bot API.

At a glance

Trigger
Telegram Trigger (Telegram Trigger)
Nodes
21
Apps
Postgres, OpenAI and Telegram
AI nodes
12
Credentials
3 types
Category
RAG, documents and vector search

Apps and integrations

  • Postgres
  • OpenAI
  • Telegram

Node types used

  • Manual Trigger
  • HTTP Request
  • Extract from File
  • Postgres PGVector Store
  • OpenAI Embeddings
  • Default Data Loader
  • Recursive Character Text Splitter
  • Telegram Trigger
  • Switch
  • OpenAI
  • Telegram
  • AI Agent
  • OpenAI Chat Model
  • Postgres Chat Memory
  • Vector Store Question Answer Tool
  • Edit Fields (Set)

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

1. Download & Extract Internal Policy Documents

Read more about the HTTP Request Tool

Begin by importing the PDF documents that contain your internal policies and FAQs—these will become the knowledge base for your Internal Helpdesk Assistant. For example, you can store a company handbook or IT/HR policy PDFs on a shared drive or cloud storage and reference a direct download link here.

In this demonstration, we'll use the HTTP Request node to fetch the PDF file from a given URL and then parse its text contents using the Extract from File node. Once extracted, these text chunks will be used to build the vector store that underpins your helpdesk chatbot’s responses.

Example Employee Handbook with Policies

2. Create Internal Policy Vector Store

Read more about the In-Memory Vector Store

Vector stores power the retrieval process by matching a user's natural language questions to relevant chunks of text. We'll transform your extracted internal policy text into vector embeddings and store them in a database-like structure.

We will be using PostgreSQL which has production ready vector support.

How it works

  1. The text extracted in Step 1 is split into manageable segments (chunks).
  2. An embedding model transforms these segments into numerical vectors.
  3. These vectors, along with metadata, are stored in PostgreSQL.
  4. When users ask a question, their query is embedded and matched to the most relevant vectors, improving the accuracy of the chatbot's response.

3. Handling Messages with Fallback Support

This workflow processes Telegram messages to handle text and voice inputs, with a fallback for unsupported message types. Here’s how it works

  1. Trigger Node
  • The workflow starts with a Telegram trigger that listens for incoming messages.
  1. Message Type Check
  • The workflow verifies the type of message received
  • Text Message: If the message contains $json.message.text, it is sent directly to the agent.
  • Voice Message: If the message contains $json.message.voice, the audio is transcribed into text using a transcription service, and the result is sent to the agent.
  1. Fallback Path
  • If the message is neither text nor voice, a fallback response is returned

"Sorry, I couldn’t process your message. Please try again."

  1. Unified Output
  • Both text messages and transcribed voice messages are converted into the same format before sending to the agent, ensuring consistency in handling.

5. Send Message

The simplest and most important part:)

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

The setup needs to be run at the start or when data is changed

4. HR & IT AI Agent Provides Helpdesk Support

n8n's AI agents allow you to create intelligent and interactive workflows that can access and retrieve data from internal knowledgebases. In this workflow, the AI agent is configured to provide answers for HR and IT queries by performing Retrieval-Augmented Generation (RAG) on internal documents.

How It Works

  • Internal Knowledgebase Access: A Vector store tool is used to connect the agent to the HR & IT knowledgebase built earlier in the workflow. This enables the agent to fetch accurate and specific answers for employee queries.
  • Chat Memory: A Chat memory subnode tracks the conversation, allowing the agent to maintain context across multiple queries from the same user, creating a personalized and cohesive experience.
  • Dynamic Query Responses: Whether employees ask about policies, leave balances, or technical troubleshooting, the agent retrieves relevant data from the vector store and crafts a natural language response.

By integrating the AI agent with a vector store and chat memory, this workflow empowers your HR & IT helpdesk chatbot to provide quick, accurate, and conversational support to employees.

PostgrSQL is used for all steps to simplify development in production.

Nodes in this workflow

The 21 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. When clicking ‘Test workflow’ (Manual Trigger)
  2. HTTP Request (HTTP Request)
  3. Extract from File (Extract from File)
  4. Create HR Policies (Postgres PGVector Store)
  5. Embeddings OpenAI (OpenAI Embeddings)
  6. Default Data Loader (Default Data Loader)
  7. Recursive Character Text Splitter (Recursive Character Text Splitter)
  8. Telegram Trigger (Telegram Trigger)
  9. Verify Message Type (Switch)
  10. OpenAI (OpenAI)
  11. Telegram1 (Telegram)
  12. Unsupported Message Type (Telegram)
  13. AI Agent (AI Agent)
  14. OpenAI Chat Model (OpenAI Chat Model)
  15. Postgres Chat Memory (Postgres Chat Memory)
  16. Answer questions with a vector store (Vector Store Question Answer Tool)
  17. Postgres PGVector Store (Postgres PGVector Store)
  18. OpenAI Chat Model1 (OpenAI Chat Model)
  19. Embeddings OpenAI1 (OpenAI Embeddings)
  20. Telegram (Telegram)
  21. Edit Fields (Edit Fields (Set))

Credentials you need

  • OpenAI API – used by Embeddings OpenAI, Embeddings OpenAI1, OpenAI and OpenAI Chat Model and others
  • Postgres – used by Create HR Policies, Postgres Chat Memory and Postgres PGVector Store
  • Telegram Bot API – used by Telegram, Telegram Trigger, Telegram1 and Unsupported Message Type

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us