Deploy a powerful RAG chatbot for Bitrix24 Open Line channels using this n8n workflow. Integrates Google Gemini, Ollama embeddings, and Qdrant vector storage for context-aware responses.
Download this n8n workflow template and start using it instantly.





















Customer service inquiries often require access to extensive, internal documentation. This advanced n8n workflow solves the problem of providing instant, document-based answers within the Bitrix24 Open Line environment. It establishes a Retrieval-Augmented Generation (RAG) system where documents stored in Bitrix24 Disk are vectorized using Ollama embeddings and stored in Qdrant. When a user asks a question, the workflow retrieves relevant context and uses the Google Gemini AI model to generate a precise, informed response. This robust n8n node combination ensures high accuracy and reduces the load on human operators, providing a seamless customer experience directly from the Bitrix24 Open Channel system. This comprehensive n8n workflow acts as a complete solution for deploying sophisticated chat functionality.
The core of this n8n workflow is driven by a webhook and organized into two main logical parts: the Main Handler and the RAG Knowledge Ingestion Sub-workflow.
Credentials n8n node extracts critical API tokens and domain information from the payload. The Validate Token n8n node ensures the request is authorized.Route Event n8n node directs the flow based on the event type (ONIMBOTMESSAGEADD, ONIMBOTJOINCHAT, ONAPPINSTALL, etc.).ONIMBOTMESSAGEADD), the flow extracts the user query. The Vector Store Retriever queries the bitrix-docs collection in Qdrant, retrieving relevant document chunks based on context embedding (using Ollama embeddings).Question and Answer Chain n8n node, which utilizes the Google Gemini Chat Model to formulate a final, contextually accurate response. This n8n node is configured to strictly maintain Bitrix24 response parameters.Send Message n8n node uses the extracted parameters to post the AI-generated reply back to the specific Bitrix24 dialog.Default Data Loader) within the designated Bitrix24 Disk folder.Default Data Loader (PDF), and split into chunks by the Recursive Character Text Splitter.Embeddings Ollama n8n node generates vector embeddings, which are then inserted into the Qdrant Vector Store (collection: bitrix-docs).To implement this n8n workflow, follow these steps:
CLIENTID and CLIENTSECRET.Bitrix24 Handler n8n node to generate the unique webhook URL. Copy this URL.ONIMBOTMESSAGEADD and ONAPPINSTALL). The Register Bot n8n node step handles API registration upon the first ONAPPINSTALL event.bitrix-docs.nomic-embed-text:latest model for vector embeddings.Credentials n8n node to specify the exact storageName (e.g., 'Shared drive') and folderName where your source documents are located within Bitrix24 Disk. Execute Workflow Trigger or running the registration flow) to load your documents into Qdrant before testing the chatbot. Bitrix24 Handler (Webhook Trigger): The starting n8n trigger. Configured to listen for POST requests at /bitrix24/openchannel-rag-bothandler.php, initiating the n8n workflow upon any Open Channel event.
Credentials (Set): Extracts authentication details (accesstoken, domain) from the incoming Bitrix24 payload and sets environment variables required for the RAG sub-workflow (storageName, folderName).
Route Event (Switch): Essential flow control n8n node that routes processing based on the body.event parameter, handling registration, joins, and messages separately.
Process Message (Function): Custom code n8n node responsible for parsing the user's message (MESSAGEORI) and ensuring essential Bitrix24 session and auth details are available for subsequent RAG steps.
Qdrant Vector Store & Vector Store Retriever (LangChain): The database component. Used during ingestion to store vectors in the bitrix-docs collection, and during the chat, the Retriever pulls relevant context.
Embeddings Ollama (LangChain): Uses the nomic-embed-text:latest model to convert document chunks and user queries into vector embeddings for similarity searching.
Google Gemini Chat Model (LangChain): The large language model (LLM) n8n node used for generating coherent and contextualized answers based on the retrieved data.
Question and Answer Chain (LangChain): The core RAG orchestration n8n node, combining the Retriever and the LLM according to a carefully structured system prompt.
Automate daily birthday and saint day notifications from Google Contacts using an n8n workflow. Integrate Telegram and Home Assistant TTS for voice announcements. Download this advanced n8n template today.

Automate Binance spot trading operations with this robust n8n workflow. Securely execute Limit/Market orders, check account status, and cancel orders using HMAC-SHA256 API signing. This n8n template shows advanced HTTP methods.

Use this advanced n8n workflow to deploy an AI Quant Agent that performs technical analysis (multi-timeframe indicators) and crypto sentiment research for Binance. Get actionable trading reports instantly on Telegram using GPT-4o-mini.

Use this comprehensive n8n workflow template to deploy a custom Bitrix24 chatbot application. Learn how the n8n trigger handles events like new messages and bot installation, ensuring seamless integration.

Automate Bitrix24 app installation, manage access tokens, and serve dynamic data to custom task widgets using this robust n8n workflow template. Start building your Bitrix24 integration today.

With 30+ years in IT and 20+ years in leadership, I specialize in no-code automation with n8n, optimizing workflows and integrating systems efficiently. As an Agile Coach and Project Manager, I’ve led teams, managed R&D, and driven IT transformations. Skilled in n8n, Java, Node.js, and cloud solutions, I help businesses streamline operations. Let’s connect if you need an n8n expert for automation!







































