Zoho: Retrieve Workflow Rule by ID
Zoho workflowRules.getWorkflowRuleById: arguments, response, policy and SDK examples.
← Workflow rules operations · Get started
Operation zoho.getworkflowrulebyid
Provider route: GET /crm/v8/settings/automation/workflow_rules/{id}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["workflowRules"]["getWorkflowRuleById"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.workflowRules.getWorkflowRuleById(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.workflow_rules.get_workflow_rule_by_id(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.id | string | Required within parent | Format: string |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Retrieve Workflow Rule by ID — response body — workflow rules |
$ (anyOf 2) | null | Alternative |
Referenced models: Retrieve Workflow Rule by ID — response body — workflow rules
Schemas
Section titled “Schemas”102 more schemas are linked from the tables above, on the schema pages.
Retrieve Workflow Rule by ID — response body — workflow rules
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the response body for a single workflow rule retrieval, containing a single-element array with the full rule details. Additional keys: not allowed |
workflow_rules | array | Required within parent | Represents the array containing the single workflow rule retrieved. Maximum items: 10 |
workflow_rules[] | Model | Each item | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item |
Referenced models: List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item
List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the full configuration and metadata of a single workflow rule, including its trigger, conditions, actions, lock status, and audit timestamps. Additional keys: not allowed |
category | string | Optional | Represents the classification category of the workflow rule. Maximum length: 255 |
conditions | array | Optional | Represents the array of condition objects that define the criteria for executing the actions of the workflow rule. Maximum items: 10 |
conditions[] | Model | Each item | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item |
created_by | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item created by |
created_time | string | Required within parent | Represents the ISO 8601 timestamp indicating when the system created this workflow rule. Format: date-time Maximum length: 255 |
deletable | boolean | Required within parent | Indicates whether the requesting user has permission to delete this workflow rule. |
deprecated | boolean | Optional | Indicates whether this workflow rule is deprecated and should be migrated to a newer configuration. |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | Represents the user-defined description of the workflow rule. Null if not set. Maximum length: 255 |
description (anyOf 2) | null | Alternative | Represents the user-defined description of the workflow rule. Null if not set. Maximum length: 255 |
editable | boolean | Required within parent | Indicates whether the requesting user has permission to edit this workflow rule. |
execute_when | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item execute when |
id | string | Required within parent | Represents the unique ID of the workflow rule. Maximum length: 20 |
last_executed_time | JSON | Required within parent | |
last_executed_time (anyOf 1) | string | Alternative | Represents the ISO 8601 timestamp of the last time this workflow rule was triggered. Null if the rule has never been triggered. Format: date-time |
last_executed_time (anyOf 2) | null | Alternative | Represents the ISO 8601 timestamp of the last time this workflow rule was triggered. Null if the rule has never been triggered. Format: date-time |
lock | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item lock |
modified_by | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item created by |
modified_time | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item modified time |
module | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item module |
name | string | Required within parent | Represents the name of the workflow rule. Maximum length: 255 |
source | string | Required within parent | Represents the origin of the workflow rule. For example, **crm** for rules created through the CRM UI, or **API** for rules created through the API. Maximum length: 255 |
status | Model | Required within parent | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item status |
Referenced models: List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item status, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item created by, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item module, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item execute when, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item lock, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item modified time
List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the activation state of a workflow rule, indicating whether the rule is currently active. Additional keys: not allowed |
active | boolean | Optional | Indicates whether the workflow rule is currently active. Possible values: true - The workflow rule is active and executes its configured actions when trigger conditions are met. false - The workflow rule is inactive and does not execute, even when trigger conditions are met. |
List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item created by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the identity details of the CRM user who created or last modified the workflow rule. Additional keys: not allowed |
id | string | Optional | Represents the unique ID of the CRM user. Format: string |
name | string | Optional | Represents the name of the CRM user who created or last modified the workflow rule. Format: string |
List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item module
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a CRM module or field reference using its API name and unique numeric ID. Minimum fields: 1 Additional keys: not allowed |
api_name | string | Required within parent | Represents the API name of the module or field, such as **Leads**, **Contacts**, or a custom field API name. Maximum length: 100 |
id | string | Required within parent | Represents the unique numeric ID of the module or field. Maximum length: 20 |
List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a single condition within a workflow rule that defines which records are evaluated and what actions are executed when the criteria are met. Additional keys: not allowed |
_delete | null | Optional | Indicates that this condition should be removed from the workflow rule when set in a PUT request. Provide a null value to signal deletion. |
criteria_details | Model | Optional | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item criteria details Record matching criteria for this condition. When provided, criteria_details must be a JSON object and cannot be null. To match all records, pass an object with criteria set to null, but do not set criteria_details itself to null. This field is required for certain trigger types, such as related module triggers like Notes on Leads. The convert action type requires criteria_details.criteria to be a non-null filter object. Omit criteria_details entirely or pass criteria as null to match all records when the trigger does not require specific criteria and no convert action is present. |
id | string | Optional | Represents the unique ID of the condition. Auto-generated on creation. Required on PUT to identify which condition to update. Format: int64 |
instant_actions | Model | Optional | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item instant actions Actions to execute immediately when the condition is met. At least one of instant_actions or scheduled_actions must be present - returns MANDATORY_NOT_FOUND if both are absent. |
scheduled_actions | Model | Optional | Expand List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item scheduled actions Actions to execute after a configured delay. Scheduled actions require both the trigger and the action type to support scheduling. |
sequence_number | JSON | Required within parent | |
sequence_number (anyOf 1) | integer | Alternative | Represents the execution order of this condition within the workflow rule, starting from one. Must be unique across all conditions in the rule. Format: int32 |
sequence_number (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item criteria details, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item instant actions, List Workflow Rules in your Zoho CRM Organization — response body — workflow rules item conditions item scheduled actions
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getworkflowrulebyid. Catalog operation: getWorkflowRuleById. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
No-content response statuses: [204]