logo_smallAxellero.io

Bitrix24

Comprehensive Bitrix24 REST API integration for CRM, task management, and collaboration in Axellero workflows.

Bitrix24 Node

Comprehensive Bitrix24 integration with OAuth2 and webhook authentication support for CRM operations, task management, calendar events, and user collaboration in Axellero workflows.

Available Operations

  • CRM Management: Complete CRUD operations for deals, contacts, companies, and leads
  • Task Management: Create, assign, and track tasks with comments and file attachments
  • User Management: Access user profiles and manage team collaboration
  • Calendar Integration: Manage events and scheduling across different calendar types
  • OAuth2 Flow: Full authentication lifecycle with token refresh support

Authentication Configuration

ParameterTypeRequiredDescription
authTypeTEXTYesAuthentication type: "oauth2" or "webhook"
domainTEXTNoBitrix24 domain (required for OAuth2, e.g., company.bitrix24.com)
accessTokenTEXTNoOAuth2 access token (required for OAuth2)
webhookUrlTEXTNoWebhook URL (required for webhook authentication)

OAuth2 Configuration

{
  "authType": "oauth2",
  "domain": "{{ctx.consts.BITRIX24_DOMAIN}}",
  "accessToken": "{{ctx.consts.BITRIX24_ACCESS_TOKEN}}"
}

Webhook Configuration

{
  "authType": "webhook",
  "webhookUrl": "{{ctx.consts.BITRIX24_WEBHOOK_URL}}"
}

OAuth2 Authentication Flow

getAuthUrl

Generate OAuth2 authorization URL for user consent.

ParameterTypeRequiredDescription
domainTEXTYesBitrix24 domain (e.g., company.bitrix24.com)
clientIdTEXTYesApplication ID from Bitrix24
redirectUriTEXTYesCallback URL configured in application
scopesTEXTNoRequested permissions (default: "user,crm")
{
  "domain": "{{ctx.consts.BITRIX24_DOMAIN}}",
  "clientId": "{{ctx.consts.BITRIX24_CLIENT_ID}}",
  "redirectUri": "{{ctx.consts.OAUTH_REDIRECT_URI}}",
  "scopes": "user,crm,task,calendar"
}

exchangeCodeForToken

Exchange authorization code for access and refresh tokens.

ParameterTypeRequiredDescription
domainTEXTYesBitrix24 domain
clientIdTEXTYesApplication ID
clientSecretTEXTYesApplication secret
codeTEXTYesAuthorization code from OAuth2 callback
redirectUriTEXTYesSame redirect URI used in authorization
{
  "domain": "{{ctx.consts.BITRIX24_DOMAIN}}",
  "clientId": "{{ctx.consts.BITRIX24_CLIENT_ID}}",
  "clientSecret": "{{ctx.consts.BITRIX24_CLIENT_SECRET}}",
  "code": "{{ctx.vars.authCode}}",
  "redirectUri": "{{ctx.consts.OAUTH_REDIRECT_URI}}"
}

refreshToken

Refresh expired access token using refresh token.

ParameterTypeRequiredDescription
domainTEXTYesBitrix24 domain
clientIdTEXTYesApplication ID
clientSecretTEXTYesApplication secret
refreshTokenTEXTYesValid refresh token from previous authorization
{
  "domain": "{{ctx.consts.BITRIX24_DOMAIN}}",
  "clientId": "{{ctx.consts.BITRIX24_CLIENT_ID}}",
  "clientSecret": "{{ctx.consts.BITRIX24_CLIENT_SECRET}}",
  "refreshToken": "{{ctx.vars.storedRefreshToken}}"
}

User Management Operations

getProfile

Get current user's profile information (supports both authentication methods).

{
  "authType": "oauth2"
}

getUserInfo

Get detailed information about a specific user.

ParameterTypeRequiredDescription
userIdTEXTNoUser ID (default: current user)
{
  "userId": "{{ctx.vars.targetUserId}}"
}

getUsers

Retrieve list of users with optional filtering.

ParameterTypeRequiredDescription
filterTEXTNoFilter conditions as JSON string
{
  "filter": "{\"ACTIVE\": \"Y\", \"DEPARTMENT\": [1, 5]}"
}

CRM Operations

Deal Management

createDeal

Create a new deal in the CRM.

ParameterTypeRequiredDescription
titleTEXTYesDeal title
stageIdTEXTNoDeal stage ID
opportunityTEXTNoDeal amount
currencyIdTEXTNoCurrency ID (default: RUB)
{
  "title": "{{ctx.vars.dealTitle}} - {{ctx.user.company}}",
  "stageId": "NEW",
  "opportunity": "{{ctx.vars.dealAmount}}",
  "currencyId": "USD"
}

getDeals

Retrieve deals with advanced filtering and pagination.

ParameterTypeRequiredDescription
filterTEXTNoFilter conditions (JSON string)
selectTEXTNoFields to select (JSON array string)
orderTEXTNoSorting order (JSON object string)
startTEXTNoPagination start
{
  "filter": "{\"STAGE_ID\": \"NEW\", \">=OPPORTUNITY\": 1000}",
  "select": "[\"ID\", \"TITLE\", \"OPPORTUNITY\", \"STAGE_ID\"]",
  "order": "{\"DATE_CREATE\": \"DESC\"}",
  "start": "0"
}

getDeal

Retrieve specific deal by ID.

ParameterTypeRequiredDescription
dealIdTEXTYesDeal ID to retrieve
{
  "dealId": "{{ctx.vars.dealId}}"
}

updateDeal

Update existing deal with new information.

ParameterTypeRequiredDescription
dealIdTEXTYesDeal ID to update
titleTEXTNoUpdated deal title
stageIdTEXTNoUpdated deal stage ID
opportunityTEXTNoUpdated deal amount
currencyIdTEXTNoUpdated currency ID
fieldsTEXTNoAdditional fields as JSON string
{
  "dealId": "{{ctx.vars.dealId}}",
  "title": "{{ctx.vars.updatedTitle}}",
  "stageId": "{{ctx.vars.newStage}}",
  "opportunity": "{{ctx.vars.newAmount}}"
}

deleteDeal

Delete deal from the CRM.

ParameterTypeRequiredDescription
dealIdTEXTYesDeal ID to delete
{
  "dealId": "{{ctx.vars.dealId}}"
}

Contact Management

createContact

Create a new contact with detailed information.

ParameterTypeRequiredDescription
nameTEXTYesContact first name
lastNameTEXTNoContact last name
emailTEXTNoContact email
phoneTEXTNoContact phone
companyIdTEXTNoAssociated company ID
fieldsTEXTNoAdditional fields (JSON string)
{
  "name": "{{ctx.user.firstName}}",
  "lastName": "{{ctx.user.lastName}}",
  "email": "{{ctx.user.email}}",
  "phone": "{{ctx.user.phone}}",
  "companyId": "{{ctx.vars.companyId}}"
}

getContacts

Retrieve contacts with filtering and pagination.

ParameterTypeRequiredDescription
filterTEXTNoFilter conditions (JSON string)
selectTEXTNoFields to select (JSON array string)
orderTEXTNoSorting order (JSON object string)
startTEXTNoPagination start
{
  "filter": "{\"HAS_EMAIL\": \"Y\", \"HAS_PHONE\": \"Y\"}",
  "select": "[\"ID\", \"NAME\", \"LAST_NAME\", \"EMAIL\", \"PHONE\"]"
}

Task Management Operations

createTask

Create a new task with assignment and scheduling.

ParameterTypeRequiredDescription
titleTEXTYesTask title
responsibleIdTEXTYesResponsible user ID
descriptionTEXTNoTask description
deadlineTEXTNoTask deadline (YYYY-MM-DD HH:MM:SS)
priorityTEXTNoTask priority: 0=low, 1=normal, 2=high
fieldsTEXTNoAdditional fields (JSON string)
{
  "title": "{{ctx.vars.taskTitle}}",
  "responsibleId": "{{ctx.vars.assigneeId}}",
  "description": "{{ctx.vars.taskDescription}}",
  "deadline": "{{ctx.vars.dueDate}}",
  "priority": "2"
}

getTasks

Retrieve tasks with filtering and pagination.

ParameterTypeRequiredDescription
filterTEXTNoFilter conditions (JSON string)
selectTEXTNoFields to select (JSON array string)
orderTEXTNoSorting order (JSON object string)
startTEXTNoPagination start
{
  "filter": "{\"RESPONSIBLE_ID\": \"{{ctx.user.id}}\", \"!STATUS\": \"5\"}",
  "order": "{\"DEADLINE\": \"ASC\", \"PRIORITY\": \"DESC\"}"
}

setTaskStatus

Update task status with predefined status codes.

ParameterTypeRequiredDescription
taskIdTEXTYesTask ID to update
statusTEXTYesStatus: 1=new, 2=pending, 3=in progress, 4=waiting, 5=completed, 6=deferred, 7=declined
{
  "taskId": "{{ctx.vars.taskId}}",
  "status": "5"
}

addTaskComment

Add comment to existing task.

ParameterTypeRequiredDescription
taskIdTEXTYesTask ID to add comment to
messageTEXTYesComment message
{
  "taskId": "{{ctx.vars.taskId}}",
  "message": "Task completed successfully with {{ctx.vars.results}}"
}

Calendar Operations

createCalendarEvent

Create new calendar event with scheduling details.

ParameterTypeRequiredDescription
nameTEXTYesEvent name/title
dateFromTEXTYesEvent start date and time (YYYY-MM-DD HH:MM:SS)
dateToTEXTYesEvent end date and time (YYYY-MM-DD HH:MM:SS)
descriptionTEXTNoEvent description
locationTEXTNoEvent location
sectionIdTEXTNoCalendar section ID
{
  "name": "{{ctx.vars.meetingTitle}}",
  "dateFrom": "{{ctx.vars.startDateTime}}",
  "dateTo": "{{ctx.vars.endDateTime}}",
  "description": "{{ctx.vars.meetingDescription}}",
  "location": "{{ctx.vars.meetingLocation}}"
}

getCalendarEvents

Retrieve calendar events with filtering options.

ParameterTypeRequiredDescription
typeTEXTNoCalendar type: user, group, company_calendar (default: user)
ownerIdTEXTNoOwner ID for the calendar
fromTEXTNoStart date (YYYY-MM-DD format)
toTEXTNoEnd date (YYYY-MM-DD format)
sectionIdTEXTNoCalendar section ID
{
  "type": "user",
  "ownerId": "{{ctx.user.id}}",
  "from": "{{ctx.vars.startDate}}",
  "to": "{{ctx.vars.endDate}}"
}

Workflow Integration

Use workflow context to create dynamic Bitrix24 operations:

{
  "title": "{{ctx.vars.eventType}} - {{ctx.user.company}}",
  "stageId": "{{ctx.nodes.stageMapper.outputs.mappedStage}}",
  "opportunity": "{{ctx.nodes.calculator.outputs.estimatedValue}}",
  "currencyId": "{{ctx.consts.DEFAULT_CURRENCY}}"
}

Response Format

Success Response

{
  "success": true,
  "result": {
    "ID": "123",
    "TITLE": "New Deal",
    "STAGE_ID": "NEW"
  }
}

Error Response

{
  "success": false,
  "error": "Invalid parameter: STAGE_ID",
  "error_description": "Stage ID not found"
}

Use Cases

  • CRM automation: Automatically create and update deals, contacts, and companies based on workflow events
  • Task management: Create and assign tasks based on business logic and deadlines
  • Calendar integration: Schedule meetings and events based on workflow triggers
  • Team collaboration: Manage user assignments and project coordination through automated workflows