Bitrix24 icon

Bitrix24

Interact with Bitrix24 CRM and business platform

Overview

The Bitrix24 node allows users to interact with the Bitrix24 CRM and business platform, specifically enabling automation rule management among other resources. The Update Rule operation under the Automation resource updates an existing automation rule in Bitrix24.

This node is beneficial for automating workflows within Bitrix24 by programmatically modifying automation rules. For example, a user can update the conditions or actions of an automation rule that triggers when a deal status changes, or modify webhook URLs that handle automation events.

Practical scenarios include:

  • Updating an automation rule's handler URL to point to a new webhook endpoint.
  • Changing the name or description of an automation rule to reflect updated business logic.
  • Adjusting the trigger order or status IDs that activate the automation.
  • Adding localized names and descriptions for multi-language support.
  • Modifying custom properties or switching between individual property fields and JSON-based properties.

Properties

Name Meaning
Authentication Method of authentication: OAuth2 (recommended), Webhook URL (simpler but less secure), or API Key.
ruleId ID of the automation rule to update (required).
documentType Type of document the automation rule applies to, e.g., CRM Deal, Lead, Contact, Company, Quote, Invoice, or Smart Process Automation entities.
spaPlacement Selects a Smart Process with automation enabled (required if documentType is spa_placement).
code Internal unique identifier of the automation rule within the application (required). Allowed characters: letters, numbers, dot, hyphen, underscore.
handler URL where the automation rule sends data via Bitrix24 queue server (required). Must be on the same domain as the application installation.
name Name of the automation rule (required).
useLocalizedNames Boolean flag to enable localized names for different languages.
localizedNames Collection of localized names with language codes and corresponding names (shown if useLocalizedNames is true).
description Description of the automation rule.
useLocalizedDescriptions Boolean flag to enable localized descriptions for different languages.
localizedDescriptions Collection of localized descriptions with language codes and corresponding descriptions (shown if useLocalizedDescriptions is true).
authUserId User ID whose token will be passed to the application (default 1).
syncRule Whether the automation rule should wait synchronously for a response from the application.
commonProperties Collection of common properties including:
- Placement: Where the rule appears in UI (Trigger List, Details Card, Activity Panel)
- Status IDs: Statuses triggering the automation
- Current Status
- Trigger Order
- Icon Type (Standard or Custom)
- Icon File URL (if custom)
- Icon (predefined icons if standard)
- Sync flag
- Template ID associated with the automation
propertiesCollection Collection of additional custom properties, each with:
- Property Name
- Property Type (String, Number, Boolean, Array, Object)
- Corresponding value field depending on type (stringValue, numberValue, booleanValue, complexValue as JSON)
useJsonProperties Whether to set properties as a single JSON object instead of individual fields.
properties JSON object representing additional properties for the automation rule (used if useJsonProperties is true).

Output

The node outputs an array of items, each containing a json object representing the result of the update operation. Typically, this includes the updated automation rule details returned from Bitrix24.

If an error occurs and "Continue On Fail" is enabled, the output contains an item with an error field describing the issue, along with the resource name and timestamp.

No binary data output is indicated.

Dependencies

  • Requires connection to Bitrix24 via one of the supported authentication methods: OAuth2, Webhook URL, or API Key.
  • The node depends on Bitrix24 API endpoints to perform operations such as updating automation rules.
  • Proper credentials must be configured in n8n for the chosen authentication method.
  • The node uses internal helper functions to make API calls to Bitrix24.

Troubleshooting

  • Common Issues:

    • Invalid or missing ruleId: The node requires a valid automation rule ID to update; ensure it exists in Bitrix24.
    • Incorrect handler URL domain: The handler URL must match the domain where the Bitrix24 application is installed.
    • Authentication failures: Ensure the selected authentication method is correctly configured and tokens/keys are valid.
    • JSON syntax errors when using properties JSON field.
    • Missing required fields like code, name, or handler.
  • Error Messages:

    • Errors from Bitrix24 API will be surfaced in the node output if "Continue On Fail" is enabled.
    • Common API errors include permission denied, invalid parameters, or resource not found.
  • Resolutions:

    • Verify all required fields are provided and correctly formatted.
    • Check authentication credentials and refresh tokens if needed.
    • Validate JSON input for custom properties.
    • Confirm the automation rule ID exists and is accessible.

Links and References

Discussion