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.
Download this n8n workflow template and start using it instantly.
Bitrix24 Administrators: Seeking to integrate custom, internal chatbots without maintaining external complex server infrastructure.
Automation Engineers: Looking for advanced n8n workflow examples utilizing webhooks, logic gates, and HTTP requests.
Developers: Needing an example of a full application lifecycle handler (install, message, delete) built entirely within an n8n node structure.
Users Exploring n8n Templates: Individuals who want to adapt a versatile n8n workflow for custom CRM tasks or messaging automation.
Developing conversational agents requires reliable event handling and routing. This specific n8n workflow solves the complexity of integrating a custom chatbot with Bitrix24 by providing a single, centralized handler for all relevant application events (message received, bot installation, chat join, deletion).
By leveraging the Bitrix24 API and an n8n trigger (the Webhook), this n8n template efficiently processes incoming requests, validates security tokens, and dynamically routes the execution path using powerful flow control nodes. The value provided is the ability to instantly deploy and customize advanced conversational logic using low-code n8n nodes, saving significant development time compared to traditional scripting methods. This n8n workflow is a perfect example of scalable CRM automation.
The entire process is initiated by an external event hitting the primary n8n trigger.
Bitrix24 Handler n8n node (a Webhook) acts as the primary n8n trigger, capturing POST data sent by Bitrix24 whenever an application event occurs (e.g., a user sends a message).Credentials n8n node, which uses the Set function to extract critical authentication information (access token, domain) from the webhook payload.Validate Token If n8n node performs a critical security check, ensuring the application token matches a known ID. If invalid, it sends an Error Response.Route Event Switch n8n node inspects the event type (e.g., ONIMBOTMESSAGEADD, ONAPPINSTALL). This branching mechanism directs the n8n workflow to the appropriate processing track.Process Message Function n8n node implements the chatbot logic (echos messages or responds to 'what's hot'). The response is sent back via the Send Message HTTP Request n8n node.Process Install Function n8n node formats registration data, including the handler's webhook URL, and registers the bot with Bitrix24 using the Register Bot HTTP Request n8n node.Process Join Function n8n node prepares a welcome message, sent via the Send Join Message HTTP Request n8n node.Success Response back to Bitrix24 via the Respond to Webhook n8n node.To utilize this complex n8n workflow, follow these steps:
Bitrix24 Handler n8n node. Activate the workflow and copy the generated Webhook URL. This URL must be configured within your Bitrix24 application settings as the callback handler.Credentials n8n node. This node contains hardcoded placeholder values for CLIENTID and CLIENTSECRET. Crucially, you must replace these placeholders with the actual Client ID and Secret obtained from your Bitrix24 Marketplace application registration. This ensures the token validation step works correctly.ONAPPINSTALL route should trigger, and the bot should register successfully.This n8n workflow leverages several core n8n node types for flow control and external communication:
Bitrix24 Handler (Webhook):
Function: Serves as the primary n8n trigger, listening for POST requests from Bitrix
24.
Key Configuration: Path set to bitrix24/handler.php; Method set to POST; Response mode set to Response Node.
Credentials (Set):
Function: Extracts and standardizes API credentials (tokens, domain) received in the webhook body, making them easily accessible as JSON fields for subsequent n8n nodes.
Key Configuration: Sets static CLIENTID and CLIENTSECRET (must be updated by the user) and dynamically extracts applicationtoken, domain, and accesstoken using expressions.
Validate Token (If):
Function: Implements a security gate. Only traffic with a valid application token is allowed to proceed to the main logic.
Key Configuration: Compares the dynamic applicationtoken (extracted) against the static CLIENTID.
Route Event (Switch):
Function: A crucial flow control n8n node that routes execution based on the Bitrix24 event type (ONIMBOTMESSAGEADD, ONAPPINSTALL, etc.).
Key Configuration: Routes based on the value of {{ $json.body.event }}.
Process Message/Join/Install (Function):
Function: Custom scripting n8n nodes that prepare the payload for API calls (e.g., composing reply messages, generating bot registration parameters).
Key Configuration: Contains Javascript logic to parse input data (DIALOGID, MESSAGE) and format the output structure needed for Bitrix24 API requests.
Send Message/Register Bot (HTTP Request):
Function: Communicates with the external Bitrix24 API endpoint to perform actions like sending a message or finalizing bot registration.
Key Configuration: Uses dynamic URL construction (=https://{{$json.DOMAIN}}/rest/...) and passes necessary body parameters (DIALOGID, MESSAGE).
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.

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.

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.

Monitor blockchain activity, detect high-risk transactions using ScrapeGraphAI, and send instant Slack alerts. This advanced n8n workflow template provides real-time monitoring and AI analysis.

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!







































