n8n

How to Automate Bitrix24 Chatbot Support?

Handle Bitrix24 chat events without manual work. The flow validates your app token, registers a bot, sends welcome notes, and replies to new messages. Good for support teams that need faster answers and clean handoffs.

An n8n Webhook listens for POST calls on a fixed path. A Set node holds your app secrets, and a token check gate stops bad calls with a 401 JSON error. A router sends install, message, join, or delete events to Function steps that read the payload and build the right action. HTTP Requests register the bot and post replies through the Bitrix24 REST API, then a success message is returned. Clear success and error JSON responses make monitoring simple and safe.

Set up a Bitrix24 app and paste the webhook URL into your app events. Match the token on both sides, activate the flow, and reinstall the app to register the bot. Expect faster first replies, fewer missed chats, and clean logs in n8n for quick audits. Useful for welcome flows, basic FAQs, and quick handoff to a human when needed.

What are the key features?

  • Webhook on a fixed path receives POST events from Bitrix24 and replies with JSON.
  • Secret token check returns a 401 JSON error when validation fails.
  • Event router directs message, join, install, and delete events to the right path.
  • Function steps parse message text, dialog ID, domain, and auth from the payload.
  • Bot registration uses the Bitrix24 imbot.register endpoint with the handler URL.
  • Replies are sent with Bitrix24 imbot.message.add for normal and welcome messages.
  • NoOp step safely acknowledges delete events without extra actions.
  • Final success response returns a simple result true JSON for easy checks.

What are the benefits?

  • Reduce manual chat replies from 60 minutes per day to 5 minutes with auto greetings and quick responses.
  • Automate up to 80% of routine chat actions like welcomes and basic info.
  • Improve security by blocking 100% of calls with the wrong token.
  • Handle five times more chats by routing events with no human routing.
  • Connect Bitrix24 chat to n8n logic through one secure webhook.

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Bitrix24. See the Tools Required section above for links to create accounts with these services.
  3. In your Bitrix24 portal, create or open your custom app or bot. Note your Client ID and Client Secret, and set an application verification token for event security.
  4. In n8n, open the Webhook node and copy the Production URL. Confirm the path ends with bitrix24/handler.php and is accessible from the internet.
  5. In the Bitrix24 app settings, paste the webhook URL into the event handlers for install, message added, and welcome events so Bitrix24 can call n8n.
  6. Open the Credentials Set node in n8n and enter values for CLIENT_ID, CLIENT_SECRET, and your APP_TOKEN. Save the node so the token check can validate events.
  7. For Bitrix24 authentication in HTTP Request nodes, double click each HTTP Request node. In the Credential to connect with dropdown, click Create new credential and follow the on screen instructions, or leave credentials empty if the node uses the AUTH token from the incoming payload.
  8. Activate the workflow in n8n so the Webhook is live. Use the production URL for all Bitrix24 event calls.
  9. Back in Bitrix24, install or reinstall the app to trigger the install event. In n8n executions, confirm that Register Bot returns a success and the Success Response shows result true.
  10. Open a chat with the bot in Bitrix24 and send a message. Verify a reply appears and that the Send Message step returns a 200 OK.
  11. If you see 401 Invalid application token, make sure the token in the Set node matches the token configured in Bitrix24. If messages do not send, check that DOMAIN and AUTH are present in the payload and that the endpoint is reachable.
  12. Update the Function nodes to change welcome text or reply templates, then save and retest the chat flow.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Bitrix24

Sign up

Basic: $49 / mo (billed annually, 5 users) — lowest plan with REST API access

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.