Bitrix24 icon

Bitrix24

Interact with Bitrix24 CRM and business platform

Actions290

Overview

The node integrates with the Bitrix24 platform, specifically enabling interaction with its chatbot features. The "Register Command" operation allows users to register a new command for a chatbot within Bitrix24. This is useful for automating responses or actions triggered by specific commands in chat conversations managed by the bot.

Typical use cases include:

  • Adding custom commands to a chatbot that trigger workflows or fetch data.
  • Automating customer support interactions by defining commands that execute backend logic.
  • Enhancing chatbot capabilities with tailored commands linked to external services via handler URLs.

For example, a user might register a "/status" command that, when invoked in chat, calls a specified URL to retrieve and display the current status of an order.

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 Identifier of the chatbot for which the command is being registered.
Command Text of the command to register (e.g., "/help").
Command Handler URL that will handle the command when it is invoked. This URL receives the command request from Bitrix24.
Options Collection of optional parameters to customize the command registration:
  Client ID Client identifier for the request.
  Open Line ID Identifier for the Open Line channel.
  Language ID Language code for localization.
  Bot Description Description text for the bot.
  Bot Avatar URL pointing to the bot's avatar image.
  Command Description Description of what the command does.
  Is Common Boolean flag indicating if the command is common (available broadly).
  Is Hidden Boolean flag indicating if the command should be hidden from users.
  Allow Extranet Boolean flag to allow extranet users to access the command.
  Message Type Type of message sent by the command. Options: Text, System.
  Attachments JSON array describing attachments to include with the command response.
  Keyboard Buttons JSON array defining keyboard layout/buttons associated with the command.
  URL Preview Boolean flag to enable or disable URL preview in messages.
  Custom Parameters JSON object containing additional custom parameters for the command registration.
  Access Token Access token string for authentication purposes (if applicable).

Output

The node outputs an array of items where each item contains a json property representing the response from Bitrix24 after attempting to register the command. The exact structure depends on the Bitrix24 API response but typically includes confirmation details about the registered command or error information.

If an error occurs and the node is configured to continue on failure, the output item will contain an error field with the error message, along with the resource name and a timestamp.

No binary data output is indicated for this operation.

Dependencies

  • Requires valid authentication credentials for Bitrix24, which can be provided via OAuth2, webhook URL, or API key.
  • The node relies on Bitrix24's REST API endpoints to perform operations.
  • Proper configuration of authentication credentials in n8n is necessary.
  • The command handler URL must be accessible externally to receive command invocations from Bitrix24.

Troubleshooting

  • Common Issues:

    • Invalid or expired authentication credentials leading to authorization errors.
    • Incorrect Bot ID or command text causing the API to reject the registration.
    • Unreachable or misconfigured command handler URL resulting in failed command execution.
    • Malformed JSON in options like attachments or keyboard buttons causing API errors.
  • Error Messages:

    • Errors returned from Bitrix24 API are surfaced in the output under the error field if "Continue On Fail" is enabled.
    • Typical errors include authentication failures, invalid parameters, or network issues.
  • Resolutions:

    • Verify and refresh authentication credentials.
    • Double-check Bot ID and command parameters for correctness.
    • Ensure the command handler URL is publicly accessible and correctly handles requests.
    • Validate JSON structures in options before submission.

Links and References

Discussion