Create Connected Workflow
Purpose
To initialize a new connected workflow process in Zoho CRM.
This API initializes a connected workflow by creating its base definition and associating it with a CRM module, which serves as the starting point for building the workflow process. Additional configuration, such as defining workflow nodes and connections, rules, and activation can be performed using the corresponding connected workflow APIs.
Endpoints
- POST /settings/connected_workflows
Request Details
Request URL
{api-domain}/crm/{version}/settings/connected_workflows
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.connected_workflows.CREATE
(or)
ZohoCRM.settings.connected_workflows.ALL
(or)
ZohoCRM.settings.ALL
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/connected_workflows"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@input.json"
-X POSTNote
- The connected workflow will be created in the Draft mode. Use the Activate Connected Workflow API to publish it.
- Connected Workflow names must be unique within your organization.
- After creation, use separate APIs to add nodes, configure rules, and activate the workflow.
- Only one connected workflow can be created per primary module.
- Connected workflows are supported only in Standard, Professional, Enterprise, and Ultimate editions.
- The user must have Manage Automations or Manage Connected Workflows permission enabled to access this API.
Input JSON
The request body must be a JSON array containing one connected_workflows object with the following keys:
- namestring, mandatory
Specify the unique name of the connected workflow process. Maximum length for this field is 50 characters. Must match the regex pattern [0-9a-zA-Z_\-\\.\|\$\?\,\'\/\!\P{InBasicLatin}\s]+ which allows alphanumeric characters, basic Latin symbols, Unicode characters, and spaces.
- descriptionstring, optional
Specify the description of the connected workflow process. Maximum length for this field is 500 characters.
- primary_moduleJSON object, mandatory
Specify the primary CRM module associated with the connected workflow. This will be the root node of the connected workflow. You must specify either the API name or the unique ID of the module.
- api_namestring, mandatory
Specify the API name of the module.
- idstring, mandatory
Specify the unique module ID.
Sample Request
Copied{
"connected_workflows": [
{
"name": "contacts-process",
"description": "contacts connected workflow sample",
"primary_module": {
"api_name": "Contacts",
"id": "4876876000000002179"
}
}
]
}Possible Errors
- 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. - DUPLICATE_DATAHTTP 400
Duplicate connected workflow name
Resolution: Provide a unique value for the name field and retry the request. - MANDATORY_NOT_FOUNDHTTP 400
Required field not found
Resolution: One or more mandatory fields are missing in the input JSON. The name of the missing field and its location can be found in the message and json_path keys of the error response. - INVALID_DATAHTTP 400
- The module is invalid
Resolution: Provide a valid module api_name or id in primary_module JSON object.
- Name field exceeds maximum length of 50 characters
Resolution: Ensure that the name field does not exceed 50 characters.
- The value of the name field does not match the allowed regex pattern
Resolution: Ensure the workflow name matches the regex pattern [0-9a-zA-Z_\-\\.\|\$\?\,\'\/\!\P{InBasicLatin}\s]+ .
- The module is invalid
- AMBIGUITY_DURING_PROCESSINGHTTP 400
Ambiguity while processing the request
Resolution: Ensure that the id and api_name inside primary_module belong to the same CRM module. - EXPECTED_FIELD_MISSINGHTTP 400
Expected field missing
Resolution: Provide at least one of the fields id or api_name inside primary_module. - LIMIT_EXCEEDEDHTTP 400
Cannot create more connected workflows due to edition limits or because only one connected workflow is allowed per primary module.
Resolution: Check the specific limits for your edition at Zoho CRM Feature List or choose a different primary module. - 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. - NO_PERMISSIONHTTP 403
Permission denied
Resolution: Ensure that the user making the API call has the Manage Autiomation 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 the 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{
"connected_workflows": [
{
"code": "SUCCESS",
"details": {
"id": "4876876000019340001"
},
"message": "connected workflow created successfully",
"status": "success"
}
]
}