e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector
Triggered manually or by an app event. Connects Code, Condition, Loop, Stop And Error, Telegram. Chat around! You can use this workflow both as a Telegram bot, or by chatting with it in n8n's interface. 🤖 This AI Agent has the mission to query both structured and vectorized databases containing all your e-mail communications. Adjust the SQL composer Workflow to point at a copy of my Translate ques
Front matter
name: e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector
description: Triggered manually or by an app event. Connects Code, Condition, Loop, Stop And Error, Telegram. ## Chat around! You can use this workflow both as a Telegram bot, or by chatting with it in n8n's interface. ## 🤖 This AI Agent has the mission to query both **structured** and **vectorized** databases containing all your e-mail communications. Adjust the *SQL composer Workflow* to point at a copy of my *Translate questions about e-mails into SQL queries and run them* template. ## IMPORTANT For this step to work, you must download my other template *Translate questions about e-mails into SQL q
category: Automation
kind: Workflow
software: Code|Condition|Loop|Stop And Error|Telegrame-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector
Triggered manually or by an app event. Connects Code, Condition, Loop, Stop And Error, Telegram. ## Chat around! You can use this workflow both as a Telegram bot, or by chatting with it in n8n's interface. ## 🤖 This AI Agent has the mission to query both structured and vectorized databases containing all your e-mail communications.
Adjust the SQL composer Workflow to point at a copy of my Translate questions about e-mails into SQL queries and run them template. ## IMPORTANT For this step to work, you must download my other template *Translate questions about e-mails into SQL q
Steps
- Telegram Trigger (telegramTrigger)
- Loop Over Items (splitInBatches)
- Came from Telegram? (if)
- When chat message received (noOp)
- Postgres PGVector Store (noOp)
- Call the SQL composer Workflow (noOp)
- Embeddings Ollama (noOp)
- Beautify chat response (set)
- Split text into chunks (code)
- Respond on Telegram in batches (telegram)
- Escape Markdown (code)
- No Operation, do nothing (noOp)
- Sticky Note (stickyNote)
- Sticky Note1 (stickyNote)
- Sticky Note2 (stickyNote)
- Sticky Note3 (stickyNote)
- Simple Memory (noOp)
- AI Agent (noOp)
- OpenAI Chat Model (noOp)
- Generate session id (set)
- Error Handler (stopAndError)
Import
Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).
Source: https://github.com/Zie619/n8n-workflows/blob/main/Telegram/1843_Telegram_Code_Automate_Triggered.md
Author: Zie619, n8n workflow collection. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.