Bitrix24 icon

Bitrix24

Interact with Bitrix24 CRM and business platform

Actions290

Overview

The Bitrix24 node integrates with the Bitrix24 CRM and business platform, enabling automation of various operations related to CRM entities, chatbots, and other resources. Specifically, for the Chatbot resource and the Leave Chat operation, this node allows a chatbot to leave a specified chat within the Bitrix24 environment.

This operation is useful in scenarios where a chatbot needs to programmatically exit a group chat or conversation, such as when a task is completed, or the bot's participation is no longer required. For example, a support chatbot might leave a customer chat after resolving an issue, or a notification bot might exit a project discussion once updates are delivered.

Properties

Name Meaning
Authentication Method used to authenticate with Bitrix24. Options:
- OAuth2 (recommended for production)
- Webhook (simpler but less secure)
- API Key authentication
Bot ID The unique identifier of the chatbot that will perform the leave action.
Chat ID The unique identifier of the chat from which the chatbot will leave.
Options Additional optional parameters to customize the request. These include:
- Client ID: Identifier for the client making the request
- Open Line ID: Identifier for open line integration
- Language ID: Language code
- Bot Description: Description text for the bot
- Bot Avatar: URL to the bot's avatar image
- Command Description: Description of a command
- Is Common: Boolean indicating if the command is common
- Is Hidden: Boolean indicating if the command is hidden
- Allow Extranet: Boolean to allow extranet access
- Message Type: Type of message ("text" or "system")
- Attachments: JSON array of attachments
- Keyboard Buttons: JSON layout for keyboard buttons
- URL Preview: Boolean to enable/disable URL preview
- Custom Parameters: JSON object for additional custom parameters
- Access Token: String token for authentication

Output

The node outputs an array of items, each containing a json property with the response data from Bitrix24 after attempting the leave chat operation. The structure typically includes:

  • Success confirmation or details about the leave action.
  • In case of failure (if "Continue On Fail" is enabled), an error object with:
    • error: Error message string.
    • resource: The resource name ("chatbot").
    • timestamp: ISO timestamp of when the error occurred.

No binary data output is indicated for this operation.

Dependencies

  • Requires connection to Bitrix24 via one of the supported authentication methods:
    • OAuth2 authentication (recommended).
    • Webhook URL.
    • API key authentication.
  • Proper configuration of credentials in n8n is necessary depending on the chosen authentication method.
  • Network access to Bitrix24 API endpoints.

Troubleshooting

  • Common Issues:

    • Invalid or expired authentication tokens leading to authorization errors.
    • Incorrect Bot ID or Chat ID causing "not found" or permission errors.
    • Insufficient permissions for the bot to leave the specified chat.
    • Malformed JSON in options like attachments or keyboard buttons causing request failures.
  • Error Messages:

    • Authorization errors: Check and refresh your authentication credentials.
    • Resource not found: Verify that the Bot ID and Chat ID are correct and that the bot is part of the chat.
    • Validation errors: Ensure all required fields are provided and optional JSON fields are correctly formatted.
    • Network errors: Confirm network connectivity and Bitrix24 service availability.
  • Enabling "Continue On Fail" in the node settings can help handle errors gracefully by returning error details instead of stopping workflow execution.

Links and References

Discussion