Bitrix24 icon

Bitrix24

Interact with Bitrix24 CRM and business platform

Actions290

Overview

The "Register Bot" operation in the Chatbot resource allows users to register a new chatbot within the Bitrix24 platform. This node facilitates creating and configuring chatbots by specifying their type, unique code, event handler URL, and various optional settings such as language, description, avatar, commands, and access permissions.

This node is beneficial for automating interactions within Bitrix24 communication channels, enabling custom bots to respond to events or messages. For example, a company could use this node to register an internal support bot that handles common employee queries or a service supervisor bot that manages customer requests through open channels.

Properties

Name Meaning
Authentication Method of authenticating with Bitrix24: OAuth2 (recommended), Webhook URL (simpler but less secure), or API Key authentication.
Bot Type Type of the bot to register: Internal Bot, Service (supervisor), or Open channel.
Bot Name The display name of the chatbot.
Bot Code A unique identifier code for the chatbot.
Event Handler URL endpoint where the bot will receive event callbacks.
Options Collection of additional optional parameters:
- Client ID Identifier for the client making the request.
- Open Line ID Identifier for the open communication line.
- Language ID Language code for the bot's responses.
- Bot Description Textual description of the bot's purpose or functionality.
- Bot Avatar URL pointing to an image used as the bot's avatar.
- Command Description Description text for the bot's command.
- Is Common Boolean indicating if the command is common (shared).
- Is Hidden Boolean indicating if the command should be hidden from users.
- Allow Extranet Boolean indicating whether extranet users are allowed to interact with the bot.
- Message Type Type of message sent by the bot: Text or System.
- Attachments JSON array defining any attachments to include with messages.
- Keyboard Buttons JSON array defining the keyboard layout/buttons presented to users.
- URL Preview Boolean indicating whether URLs in messages should show a preview.
- Custom Parameters JSON object containing any additional custom parameters for the bot registration.
- Access Token Access token string used for authentication when required.

Output

The node outputs an array of items, each containing a json field with the response data from the Bitrix24 API regarding the bot registration process. If an error occurs and the node is configured to continue on failure, the output includes an error object with the error message, resource name, and timestamp.

No binary data output is indicated.

Dependencies

  • Requires valid authentication credentials for Bitrix24 via one of the supported methods: OAuth2, webhook URL, or API key.
  • The node depends on Bitrix24 API endpoints to perform the bot registration.
  • Proper configuration of authentication credentials in n8n is necessary.
  • Network access to Bitrix24 API endpoints and the event handler URL must be available.

Troubleshooting

  • Common Issues:

    • Invalid or missing authentication credentials can cause authorization failures.
    • Incorrect or unreachable event handler URL may result in failed event delivery.
    • Duplicate bot codes might cause registration errors.
    • Improperly formatted JSON in options like attachments or keyboard buttons can lead to API errors.
  • Error Messages:

    • Errors returned from Bitrix24 API will be included in the output if "Continue On Fail" is enabled.
    • Typical errors include authentication failures, invalid parameters, or network issues.
  • Resolutions:

    • Verify and update authentication credentials.
    • Ensure the event handler URL is correct and accessible.
    • Check uniqueness of the bot code.
    • Validate JSON formatting for complex option fields.

Links and References

Discussion