Get the list of templates bizproc.workflow.template.list

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: bizproc

Who can execute the method: administrator

This method retrieves a list of business process templates created in the workflow designer.

Templates of automation rules configured at the stages of CRM items and smart processes, or in tasks, are not returned by this method. Such templates are not available in the REST API.

Method Parameters

Name
type

Description

SELECT
array

The array contains a list of fields to select.

You can specify only the fields that are necessary.

Default value — ['ID']

FILTER
object

An object for filtering the list of business process templates in the format {"field_1": "value_1", ... "field_N": "value_N"}, where

  • field_Nfield of the template for filtering
  • value_N — field value

You can specify the type of filtering before the name of the filtered field:

  • = — equal
  • ! or != — not equal
  • < — less than
  • <= — less than or equal to
  • > — greater than
  • >= — greater than or equal to

Without a prefix, the filter compares the value for equality. The field name can be passed in any case

ORDER
object

An object for sorting the list of launched business processes in the format {"field_1": "value_1", ... "field_N": "value_N"}, where

  • field_Nfield of the template for sorting
  • value_N — sorting direction

Sorting direction can take the values:

  • asc — ascending
  • desc — descending

You can specify multiple fields for sorting, for example, {NAME: 'ASC', ID: 'DESC'}.

Default value — {ID: 'ASC'}

start
integer

This parameter is used for managing pagination.

The page size of results is always static — 50 records.

To select the second page of results, you need to pass the value 50. To select the third page of results — the value 100, and so on.

The formula for calculating the start parameter value:

start = (N - 1) * 50, where N — the number of the desired page

Template Fields

Name
type

Description

ID
integer

Identifier of the business process template

MODULE_ID
string

Identifier of the module by document. Possible values:

  • crm — CRM
  • lists — universal lists
  • disk — drive

ENTITY
string

Identifier of the object by document. Possible values:

CRM

  • CCrmDocumentLead — leads
  • CCrmDocumentContact — contacts
  • CCrmDocumentCompany — companies
  • CCrmDocumentDeal — deals
  • Bitrix\Crm\Integration\BizProc\Document\Quote — estimates
  • Bitrix\Crm\Integration\BizProc\Document\SmartInvoice — invoices
  • Bitrix\Crm\Integration\BizProc\Document\Dynamic — SPAs

Lists

  • BizprocDocument — processes in the news feed
  • Bitrix\Lists\BizprocDocumentLists — lists in groups

Drive

  • Bitrix\Disk\BizProcDocument

DOCUMENT_TYPE
string

Document type. Possible values:
crm:

  • LEAD — leads
  • CONTACT — contacts
  • COMPANY — companies
  • DEAL — deals
  • QUOTE — estimates
  • SMART_INVOICE — invoices
  • DYNAMIC_XXX — SPAs, where XXX — identifier of the SPA

lists:

  • iblock_XXX — information block, where XXX — identifier of the information block

drive:

  • STORAGE_XXX — drive storage, where XXX — identifier of the storage

AUTO_EXECUTE
integer

Auto-execute flag. Can take values:

  • 0 — no auto-execute
  • 1 — execute on creation
  • 2 — execute on modification
  • 3 — execute on creation and modification

NAME
string

Template name

TEMPLATE
array

Array with the description of the template's action structure

PARAMETERS
array

Template parameters

VARIABLES
array

Template variables

CONSTANTS
array

Template constants

MODIFIED
datetime

Date of last modification

IS_MODIFIED
boolean

Whether the template has been modified. Possible values:

  • Y — yes, it has been modified
  • N — no

This option is needed for typical templates of business processes

USER_ID
integer

Identifier of the user who created or modified the template

SYSTEM_CODE
string

System code of the template.

Needed for identifying typical business process templates or templates created by the application

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"select":["ID","NAME","USER_ID","SYSTEM_CODE"],"filter":{"MODULE_ID":"lists","AUTO_EXECUTE":0},"order":{"ID":"DESC"}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/bizproc.workflow.template.list
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"select":["ID","NAME","USER_ID","SYSTEM_CODE"],"filter":{"MODULE_ID":"lists","AUTO_EXECUTE":0},"order":{"ID":"DESC"},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/bizproc.workflow.template.list
        
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory usage.
        
        const parameters = {
            select: [
                'ID',
                'NAME',
                'USER_ID',
                'SYSTEM_CODE'
            ],
            filter: {
                MODULE_ID: 'lists',
                AUTO_EXECUTE: 0
            },
            order: {
                ID: 'DESC'
            }
        };
        
        try {
            const response = await $b24.callListMethod('bizproc.workflow.template.list', parameters);
            const items = response.getData() || [];
            for (const entity of items) { console.log('Entity:', entity); }
        } catch (error) {
            console.error('Request failed', error);
        }
        
        // fetchListMethod: Retrieves data in parts using an iterator. Use it for large data volumes to optimize memory usage.
        
        try {
            const generator = $b24.fetchListMethod('bizproc.workflow.template.list', parameters, 'ID');
            for await (const page of generator) {
                for (const entity of page) { console.log('Entity:', entity); }
            }
        } catch (error) {
            console.error('Request failed', error);
        }
        
        // callMethod: Manually controls pagination through the start parameter. Use it for precise control of request batches. For large datasets, it is less efficient than fetchListMethod.
        
        try {
            const response = await $b24.callMethod('bizproc.workflow.template.list', parameters, 0);
            const result = response.getData().result || [];
            for (const entity of result) { console.log('Entity:', entity); }
        } catch (error) {
            console.error('Request failed', error);
        }
        
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        try:
            bitrix_response = client.bizproc.workflow.template.list(
                select=[
                    "ID",
                    "NAME",
                    "USER_ID",
                    "SYSTEM_CODE",
                ],
                filter={
                    "MODULE_ID": "lists",
                    "AUTO_EXECUTE": 0,
                },
                order={
                    "ID": "DESC",
                },
            ).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}")
        

Example as_list

from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        try:
            bitrix_response = client.bizproc.workflow.template.list(
                select=[
                    "ID",
                    "NAME",
                    "USER_ID",
                    "SYSTEM_CODE",
                ],
                filter={
                    "MODULE_ID": "lists",
                    "AUTO_EXECUTE": 0,
                },
                order={
                    "ID": "DESC",
                },
            ).as_list().response
            result = bitrix_response.result
            for item in result:
                print(item)
        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}")
        

Example as_list_fast

from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        try:
            bitrix_response = client.bizproc.workflow.template.list(
                select=[
                    "ID",
                    "NAME",
                    "USER_ID",
                    "SYSTEM_CODE",
                ],
                filter={
                    "MODULE_ID": "lists",
                    "AUTO_EXECUTE": 0,
                },
                order={
                    "ID": "DESC",
                },
            ).as_list_fast(descending=True).response
            result = bitrix_response.result
            for item in result:
                print(item)
        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 {
        	$result = $serviceBuilder
        		->getBizProcScope()
        		->template()
        		->list(
        			['ID', 'MODULE_ID', 'ENTITY', 'DOCUMENT_TYPE', 'AUTO_EXECUTE', 'NAME', 'TEMPLATE', 'PARAMETERS', 'VARIABLES', 'CONSTANTS', 'MODIFIED', 'IS_MODIFIED', 'USER_ID', 'SYSTEM_CODE'],
        			[]
        		);
        	foreach ($result->getTemplates() as $template) {
        		print("ID: " . $template->ID . "\n");
        		print("MODULE_ID: " . $template->MODULE_ID . "\n");
        		print("ENTITY: " . $template->ENTITY . "\n");
        		print("DOCUMENT_TYPE: " . json_encode($template->DOCUMENT_TYPE) . "\n");
        		print("AUTO_EXECUTE: " . ($template->AUTO_EXECUTE ? $template->AUTO_EXECUTE->value : 'null') . "\n");
        		print("NAME: " . $template->NAME . "\n");
        		print("TEMPLATE: " . json_encode($template->TEMPLATE) . "\n");
        		print("PARAMETERS: " . json_encode($template->PARAMETERS) . "\n");
        		print("VARIABLES: " . json_encode($template->VARIABLES) . "\n");
        		print("CONSTANTS: " . json_encode($template->CONSTANTS) . "\n");
        		print("MODIFIED: " . ($template->MODIFIED ? $template->MODIFIED->format(DATE_ATOM) : 'null') . "\n");
        		print("IS_MODIFIED: " . ($template->IS_MODIFIED ? 'true' : 'false') . "\n");
        		print("USER_ID: " . $template->USER_ID . "\n");
        		print("SYSTEM_CODE: " . $template->SYSTEM_CODE . "\n");
        		print("\n");
        	}
        } catch (Throwable $e) {
        	print("Error: " . $e->getMessage() . "\n");
        }
        
BX24.callMethod(
            'bizproc.workflow.template.list',
            {
                select: [
                    'ID',
                    'NAME',
                    'USER_ID',
                    'SYSTEM_CODE'
                ],
                filter: {
                    MODULE_ID: 'lists',
                    AUTO_EXECUTE: 0
                },
                order: {
                    ID: 'DESC'
                }
            },
            function(result)
            {
                if(result.error())
                    alert("Error: " + result.error());
                else
                    console.log(result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'bizproc.workflow.template.list',
            [
                'select' => [
                    'ID',
                    'NAME',
                    'USER_ID',
                    'SYSTEM_CODE'
                ],
                'filter' => [
                    'MODULE_ID' => 'lists',
                    'AUTO_EXECUTE' => 0
                ],
                'order' => [
                    'ID' => 'DESC'
                ]
            ]
        );
        
        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.workflow.template.list", b24.Params{
        	"SELECT": []string{"ID", "NAME", "USER_ID", "SYSTEM_CODE"},
        	"FILTER": b24.Params{
        		"MODULE_ID":    "lists",
        		"AUTO_EXECUTE": 0,
        	},
        	"ORDER": b24.Params{
        		"ID": "DESC",
        	},
        }, b24.WithIdempotent())
        if err != nil {
        	return fmt.Errorf("bizproc.workflow.template.list: %w", err)
        }
        
        // The response arrives as json.RawMessage — unmarshal it
        // into a struct matching the response shape shown below on this page.
        fmt.Printf("%s\n", res.Result)
        

Response Handling

HTTP status: 200

{
            "result": [
                {
                    "ID": "525",
                    "NAME": "Display Time",
                    "USER_ID": "503",
                    "SYSTEM_CODE": "rest_app_5"
                },
                {
                   "ID": "379",
                   "NAME": "App template",
                   "USER_ID": "503",
                   "SYSTEM_CODE": "rest_app_5"
                }
            ],
            "total": 34,
            "time": {
                "start": 1737535822.539526,
                "finish": 1737535822.564579,
                "duration": 0.025053024291992188,
                "processing": 0.0019738674163818359,
                "date_start": "2025-01-22T11:50:22+02:00",
                "date_finish": "2025-01-22T11:50:22+02:00",
                "operating_reset_at": 1737536422,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
array

The root element of the response.

Contains an array of objects with information about business process templates.

Each object contains fields of the template specified in the SELECT parameter

total
integer

Total number of records found

time
time

Information about the execution time of the request

Error Handling

HTTP status: 400

{
            "error": "ACCESS_DENIED",
            "error_description": "Access denied!"
        }
        

Name
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Code

Error Message

Description

ACCESS_DENIED

Access denied!

The method was not executed by an administrator

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
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

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

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

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 — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not 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

401

insufficient_scope
The request requires higher privileges than provided by the webhook token

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 provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

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

Continue Learning