This n8n workflow creates a sophisticated chatbot system that enables querying your email database through Telegram, utilizing both semantic search and structured SQL queries. Its goal is to provide quick, accurate responses to email-related questions by leveraging vector embeddings and SQL data retrieval. The workflow begins with a Telegram trigger that listens for messages in a specified chat. When a message is received, it is processed to determine if it originates from Telegram, and then it initiates a conversation with a LangChain AI agent. The AI agent is configured to access a vector database of email embeddings and a structured email database via SQL queries. It can perform semantic searches using Ollama’s embedding model and structured database searches using an SQL workflow. Responses are chunked for readability, formatted, and then sent back to the user either through Telegram or within n8n’s interface. This setup is ideal for users who manage large email volumes and need an intelligent way to retrieve specific email information swiftly, especially in professional or research contexts.
Smart Email Querying with Telegram and LangChain Integration
Node Count | 11 – 20 Nodes |
---|---|
Nodes Used | @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.chatTrigger, @n8n/n8n-nodes-langchain.embeddingsOllama, @n8n/n8n-nodes-langchain.lmChatOpenAi, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.toolWorkflow, @n8n/n8n-nodes-langchain.vectorStorePGVector, code, if, noOp, set, splitInBatches, stickyNote, telegram, telegramTrigger |
Reviews
There are no reviews yet.