Get the Rules of a Connected Workflow
Purpose
To retrieve the trigger conditions of all rules configured for the specified module within the connected workflow.
Each object in the response represents one rule associated with the given module. The response does not include the actions configured for the rules.
Endpoints
- GET /settings/connected_workflows/{connected_workflow_ID}/rules
Request Details
Request URL
{api-domain}/crm/v8/settings/connected_workflows/{connected_workflow_ID}/rules
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.connected_workflows.READ
(or)
ZohoCRM.settings.connected_workflows.ALL
(or)
ZohoCRM.settings.ALL
Parameters
- modulestring, mandatory
Specify the API name of the module for which the rules must be retrieved.
Note
- Connected workflows are supported in Standard, Professional, Enterprise, and Ultimate editions.
- The user must have Manage Automations or Manage Connected Workflow permission enabled to access this API.
- This API returns only the trigger conditions of the rules and does not include the actions configured for the rules. To get all the details of the rule including the trigger conditions and actions, use the Get Specific Rule of a Connected Workflow API.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/connected_workflows/4876876000019209017/rules?module=Deals"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GETResponse JSON
The response contains a rules array which contains the list of rules configured for the specified module in the connected workflow. Each rule object contains:
- idstring
Unique ID of the rule in the connected workflow.
- moduleJSON object
Represents the module to which the rule belongs. The module object contains the module API name and the ID of the module.
- execute_whenJSON object
Represents the trigger configuration that determines when the rule is executed.
- typestring
Represents the type of trigger for rule.
- detailsJSON object
Contains the detailed information about the trigger, including the criteria and the trigger module.
- trigger_moduleJSON object
Represents the module that triggers this rule. This object contains the module API name and the unique ID of the trigger module.
- criteriaJSON object
Represents the field based criteria that must be satisfied for the rule to execute. Please note that this doesn't include any module based or other module criteria based on which the trigger executes.
The criteria object contains the details of the field, the comparator, the value against which it is to be compared, and the type of value.
- repeatBoolean
Indicates whether the rule should repeat execution based on the trigger type.
Behavior by trigger type:
- field_update: If true, the rule executes every time the specified field is updated; if false, it executes only on the first update.
- edit: If true, the rule executes on every edit; if false, only on the first edit.
- create_or_edit: If true, the rule executes on create and every edit; if false, only on create or first edit.
- sourcestring
Represents the source of the rule creation.
Possible values: crm
Possible Errors
- INVALID_DATAHTTP 400
The given ID seems to be invalid
Resolution: Provide a valid connected workflow ID in the request URL. - INVALID_MODULEHTTP 400
The value provided to the param is Invalid
Resolution: Provide a valid module API name as the module parameter value. - REQUIRED_PARAM_MISSINGHTTP 400
Required param not found
Resolution: Specify the module parameter in the request URL, with a valid value. - FEATURE_NOT_SUPPORTEDHTTP 400
Your edition doesn't support this feature
Resolution: Upgrade the account to Standard, Professional, Enterprise, or Ultimate edition and then retry the request. - 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. - 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. - AUTHENTICATION_FAILUREHTTP 401
Authentication failed
Resolution: Pass a valid access token along the request to authenticate. - NO_PERMISSIONHTTP 403
Permission denied
Resolution: Ensure that the user making the API call has the Manage Automation or Connected Workflow permission enabled in their CRM profile, and then retry the request. - 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{
"rules": [
{
"execute_when": {
"details": {
"trigger_module": {
"api_name": "Deals",
"id": "4876876000000002181"
}
},
"type": "create"
},
"module": {
"api_name": "Deals",
"id": "4876876000000002181"
},
"id": "4876876000019209027",
"source": "crm"
},
{
"execute_when": {
"details": {
"trigger_module": {
"api_name": "Deals",
"id": "4876876000000002181"
},
"criteria": {
"comparator": "equal",
"field": {
"api_name": "Status",
"id": "4876876000011097036"
},
"type": "value",
"value": "Planning"
},
"repeat": true
},
"type": "field_update"
},
"module": {
"api_name": "Deals",
"id": "4876876000000002181"
},
"id": "4876876000019212197",
"source": "crm"
},
{
"execute_when": {
"details": {
"trigger_module": {
"api_name": "Deals",
"id": "4876876000000002181"
},
"criteria": {
"comparator": "equal",
"field": {
"api_name": "Stage",
"id": "4876876000000002565"
},
"type": "value",
"value": "Closed Won"
},
"repeat": true
},
"type": "field_update"
},
"module": {
"api_name": "Deals",
"id": "4876876000000002181"
},
"id": "4876876000019214807",
"source": "crm"
}
]
}