Get Actions Count in Workflow Rules
Purpose
To retrieve the total number of actions configured in the specified Workflow rules, including both instant and scheduled actions. The response includes a count of actions, categorized by action type.
Endpoints
- GET /settings/automation/workflow_rule/actions/actions_count?ids={id1, id2, id3, ..}
Request Details
Request URL
{api-domain}/crm/{version} /settings/automation/workflow_rule/actions/actions_count
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.workflow_rules.ALL
(or)
ZohoCRM.settings.workflow_rules.READ
Parameters
- idsstring, mandatory
Specify the Workflow rule(s) for which the action counts need to be retrieved. Pass one or more Workflow rule IDs, separated by commas.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/workflow_rules/actions/actions_count?ids=4876876000011040016,4876876000011073001"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GET
Response JSON Keys
- idstring
Unique ID of the Workflow rule.
- conditionsJSON array
The list of condition groups within the Workflow rule. Each object contains:
- sequence_numberinteger
The sequence number of the condition.
- idstring
The unique ID of the condition.
- instant_actions.actions_countJSON array
Contains the count of each action type in the instant actions. Each object contains the type of action, and the number of actions of this type in the instant actions.
- scheduled_actions.actions_countJSON array
Contains the count of each action type in the scheduled actions. Each object contains the type of action, and the number of actions of this type in the scheduled actions.
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: This API supports only the GET method. Retry the request using the GET method. - REQUIRED_PARAM_MISSINGHTTP 400
One of the expected parameter is missing
Resolution: Pass the ids parameter in the API request. This parameter is mandatory for this API call. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have the required OAUTH SCOPE. Create a new token with valid scope. Refer to the Scope section for more details. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section for more details. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied{
"workflow_rules": [
{
"id": "4876876000011040016",
"conditions": [
{
"sequence_number": 1,
"instant_actions": {
"actions_count": [
{
"type": "field_updates",
"value": 1
},
{
"type": "email_notifications",
"value": 1
}
]
},
"scheduled_actions": [
{
"actions_count": [
{
"type": "email_notifications",
"value": 1
}
]
}
],
"id": "4876876000011040017"
}
]
},
{
"id": "4876876000011073001",
"conditions": [
{
"sequence_number": 1,
"instant_actions": {
"actions_count": [
{
"type": "email_notifications",
"value": 1
}
]
},
"scheduled_actions": [
{
"actions_count": [
{
"type": "tasks",
"value": 1
}
]
}
],
"id": "4876876000011073002"
},
{
"sequence_number": 2,
"instant_actions": {
"actions_count": [
{
"type": "field_updates",
"value": 1
}
]
},
"scheduled_actions": null,
"id": "4876876000011073005"
}
]
}
]
}