Bitrix24 icon

Bitrix24

Interact with Bitrix24 CRM and business platform

Actions290

Overview

The Bitrix24 node enables interaction with the Bitrix24 CRM and business platform. Specifically, for the Chatbot resource and the Update Command operation, this node updates an existing chatbot command's properties within a Bitrix24 instance.

This operation is useful when you want to modify the behavior or metadata of a chatbot command without recreating it. For example, you might update the command description, change its visibility, adjust access permissions, or modify the message type and attachments associated with the command.

Practical scenarios include:

  • Updating a chatbot command to reflect new functionality or instructions.
  • Changing the command's accessibility (e.g., making it hidden or common).
  • Modifying the bot avatar or description linked to the command.
  • Adjusting keyboard buttons or attachments sent by the bot in response to the command.

Properties

Name Meaning
Authentication Method used to authenticate with Bitrix24. Options: OAuth2 (recommended), Webhook (simpler but less secure), API Key.
Bot ID The unique identifier of the chatbot whose command is being updated.
Command ID The unique identifier of the specific command to update.
Options A collection of optional parameters to customize the command update:
- Client ID Identifier for the client making the request.
- Open Line ID Identifier for the open communication line.
- Language ID Language code specifying the language context.
- Bot Description Text description of the chatbot.
- Bot Avatar URL pointing to the chatbot's avatar image.
- Command Description Text description of the command itself.
- Is Common Boolean flag indicating if the command is common (shared).
- Is Hidden Boolean flag indicating if the command should be hidden from users.
- Allow Extranet Boolean flag indicating whether extranet users are allowed to use the command.
- Message Type Type of message sent by the command. Options: "Text", "System".
- Attachments JSON array describing any attachments to include with the command's message.
- Keyboard Buttons JSON array defining the layout of keyboard buttons presented 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.
- Access Token Access token string used for authentication (if applicable).

Output

The node outputs an array of items where each item contains a json property representing the result of the update operation. Typically, this includes confirmation details or the updated command data returned from Bitrix24.

If an error occurs and the node is configured to continue on failure, the output will contain an error object with fields:

  • 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 a Bitrix24 instance.
  • Supports three authentication methods: OAuth2, webhook URL, or API key.
  • Proper credentials must be configured in n8n according to the chosen authentication method.
  • The node relies on internal helper functions to make API calls to Bitrix24 endpoints.

Troubleshooting

  • Common Issues:

    • Invalid or expired authentication tokens can cause authorization failures.
    • Incorrect Bot ID or Command ID will result in errors indicating that the resource was not found.
    • Malformed JSON in attachments, keyboard buttons, or custom parameters may cause parsing errors.
    • Insufficient permissions in Bitrix24 for updating chatbot commands.
  • Error Messages:

    • Errors thrown during execution will include the message from Bitrix24 API responses.
    • If "continue on fail" is enabled, errors are returned as part of the output JSON for easier debugging.
  • Resolution Tips:

    • Verify that the Bot ID and Command ID are correct and exist in your Bitrix24 environment.
    • Ensure the authentication credentials are valid and have necessary scopes/permissions.
    • Validate JSON inputs for attachments, keyboard buttons, and custom parameters before running the node.
    • Check Bitrix24 user permissions related to chatbot management.

Links and References

Discussion