Return Parameters to Action or Automation Rule bizproc.event.send
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
bizprocWho can execute the method: any user
The bizproc.event.send method returns the output parameters to the Automation rule or action that were specified during the registration or update of the Automation rule or action.
The call completes a step that is waiting for a response, even if RETURN_VALUES is not passed. To write an intermediate message to the log without completing the step, use the bizproc.activity.log method.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
EVENT_TOKEN* |
The run token of the Automation rule or action. Bitrix24 passes it to the application handler in the The process accepts the result only if the step with this token is still waiting for a response. Waiting is enabled by the |
|
RETURN_VALUES |
Return values of the Automation rule or action. The keys are the parameter codes from Keys are case-insensitive. Bitrix24 converts the value to the To leave a parameter empty, pass an empty string |
|
LOG_MESSAGE |
Text for the business process log. If this parameter is not passed, the log receives the standard entry "Received application response". Event logging must be enabled in the business process template |
The method checks only the signature of EVENT_TOKEN: with an invalid token, it returns the ACCESS_DENIED error. The method responds before Bitrix24 passes the values to the process. If the step has already completed, timed out, or is not waiting for a response, the method still returns true, and the process does not change.
How to Return an Empty Value
To make an Automation rule or action return a parameter as empty, pass an empty string "" in RETURN_VALUES. This works for a parameter of any type, including a multiple one, and with any way of calling the method. An empty string also overrides the Default value set at registration.
The process handles other values differently. The "empty" condition in Automation rules and business processes does not match all of them.
|
Value in |
Result in the process |
|
|
The parameter is empty |
|
Key not passed |
The parameter receives the |
|
|
The parameter receives the |
|
|
In a request with a JSON body, the parameter is empty. BX24.js and CRest send |
|
|
In a request with a JSON body, the parameter is empty. BX24.js and CRest do not send an empty array, and the parameter receives the |
|
|
The parameter is set to |
|
|
For a parameter of the |
|
String of spaces |
The parameter is set to the string of spaces |
Code Examples
How to Use Examples in Documentation
In the example, the outputString parameter is returned with a value, and errorText is returned empty.
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"event_token":"55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90","return_values":{"outputString":"846c55d14f552180874a628d2615e285","errorText":""}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/bizproc.event.send
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"event_token":"55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90","return_values":{"outputString":"846c55d14f552180874a628d2615e285","errorText":""},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/bizproc.event.send
try
{
const response = await $b24.actions.v2.call.make({
method: 'bizproc.event.send',
params: {
event_token: '55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90',
return_values: {
outputString: '846c55d14f552180874a628d2615e285',
errorText: ''
}
}
});
if (!response.isSuccess)
console.error(response.getErrorMessages().join('; '));
else
console.log('Success:', response.getData().result);
}
catch (error)
{
console.error('Error:', error);
}
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.bizproc.event.send(
event_token="55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90",
return_values={
"outputString": "846c55d14f552180874a628d2615e285",
"errorText": "",
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$response = $b24Service
->core
->call(
'bizproc.event.send',
[
'event_token' => '55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90',
'return_values' => [
'outputString' => '846c55d14f552180874a628d2615e285',
'errorText' => ''
]
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . var_export($result[0], true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error sending bizproc event: ' . $e->getMessage();
}
BX24.callMethod(
'bizproc.event.send',
{
event_token: '55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90',
return_values: {
outputString: '846c55d14f552180874a628d2615e285',
errorText: ''
}
},
function(result) {
if(result.error())
alert("Error: " + result.error());
else
alert("Success: " + result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'bizproc.event.send',
[
'event_token' => '55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90',
'return_values' => [
'outputString' => '846c55d14f552180874a628d2615e285',
'errorText' => ''
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "bizproc.event.send", b24.Params{
"EVENT_TOKEN": "55c1dc1c3f0d75.78875596|A51601_82584_96831_81132|hsyUws1j4XiwqPqN45eH66CcQtEvpUIP.47dd5d888e8e549d2c984713e12a4268e6e87d0208ca1f093ba1075e77f92e90",
"RETURN_VALUES": b24.Params{
"outputString": "846c55d14f552180874a628d2615e285",
"errorText": "",
},
})
if err != nil {
return fmt.Errorf("bizproc.event.send: %w", err)
}
var ok bool
if err := json.Unmarshal(res.Result, &ok); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println("done:", ok)
Response Handling
HTTP Status: 200
{
"result": true,
"time": {
"start": 1738152544.203554,
"finish": 1738152544.248411,
"duration": 0.044857025146484375,
"processing": 0.0039920806884765625,
"date_start": "2025-01-29T15:09:04+01:00",
"date_finish": "2025-01-29T15:09:04+01:00",
"operating_reset_at": 1738153144,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
|
|
time |
Information about the request execution time |
Error Handling
HTTP Status: 403
{
"error": "ACCESS_DENIED",
"error_description": "Access denied!"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
Access denied! |
|
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |