e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector

Automated workflow: e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector. This workflow integrates 16 different services: telegramTrigger, stickyNote, telegram, code, agent. It contains 23 nodes and follows best practices for error handling and security.

Integrations Used (1)

Workflow Structure (17 nodes)
100%
Telegram Trigger
Telegram Trigger
Code
Split text into chunks
Split In Batches
Loop Over Items
Code
Escape Markdown
No Op
No Operation, do nothing
Telegram
Respond on Telegram in batches
No Op
When chat message received
Set
Generate session id
No Op
OpenAI Chat Model
No Op
Simple Memory
No Op
AI Agent
No Op
Postgres PGVector Store
No Op
Embeddings Ollama
No Op
Call the SQL composer Workflow
If
Came from Telegram?
Stop And Error
Error Handler
Set
Beautify chat response
Node Types:
trigger
logic
default
transform
code
action
Requires credentials

Prerequisites

Required Credentials (4)

Ollama

Used by: Embeddings Ollama

Docs

OpenAI

Used by: OpenAI Chat Model

Docs

Postgres

Used by: Postgres PGVector Store

Docs

Telegram

Used by: Telegram Trigger, Respond on Telegram in batches

Docs

Multiple services required

This workflow needs 4 different credentials. Make sure you have accounts for all services before importing.

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~55 min
Score: 93/100
Custom Code
Conditional Logic
Loops
4 Integrations

When to Use This Workflow

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Time Savings

Replace repetitive manual tasks with reliable automation.

Reclaim hours every week for higher-value work.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "id": "LPQsiqt476n7ne7f",
  "meta": {
    "instanceId": "workflow-af1a6c9c",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:57.777057",
    "updatedAt": "2025-09-29T07:07:57.777076",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
...

Workflow Details

Nodes
21
Trigger
Event
Source
community
Added
Sep 29, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Deep Research Report Generation Using Open Router, Google Search, Webhook/Telegram and Notion

Automated workflow: Deep Research Report Generation Using Open Router, Google Search, Webhook/Telegram and Notion. This...

Telegram
Http-request
Notion
Webhook
38 nodesEvent

Errortrigger Workflow

Automated workflow: Errortrigger Workflow. This workflow integrates 5 different services: stickyNote, telegram, errorTri...

Telegram
6 nodesEvent

google drive to instagram, tiktok and youtube

Automated workflow: google drive to instagram, tiktok and youtube. This workflow integrates 11 different services: write...

Google-drive
Telegram
Http-request
15 nodesEvent

template in store

Automated workflow: template in store. This workflow integrates 11 different services: writeBinaryFile, stickyNote, http...

Google-drive
Telegram
Http-request
13 nodesEvent

Telegramtrigger Workflow

Automated workflow: Telegramtrigger Workflow. This workflow integrates 9 different services: telegramTrigger, stickyNote...

Telegram
Google-sheets
30 nodesEvent

Stickynote Workflow

Automated workflow: Stickynote Workflow. This workflow integrates 6 different services: telegramTrigger, stickyNote, fil...

N8n
Telegram
13 nodesEvent