Menu
Count records in a module
Count records in a module
/{moduleApiName}/actions/countUse it in a workflow
- Add a step and choose the Zoho CRM connector.
- Pick the Count records in a module action (under Records).
- Fill in the fields below, then reference the result from later steps as
{{countRecordsInAModule.response.data}}.
Request
Path parameters
moduleApiNamestringrequiredSpecify the API name of the module for which you want to retrieve the record count. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for valid values.
Query parameters
emailstringSpecify an email address to filter the count to records that contain this value in any email field of the specified module. Encode special characters before submitting (for example, use `p%2Bboyle@abc.com` for `p+boyle@abc.com`).
phonestringSpecify a phone number to filter the count to records that contain this value in any phone field of the specified module.
wordstringSpecify a search term to filter the count to records that contain this word in any searchable field within the specified module.
cvidstringSpecify the ID of the Custom View from which to retrieve the record count. Refer to the [Get Custom Views](custom_views.yaml#$.paths./settings/custom_views.get) resource for valid values.
criteriastringPerforms search by following the shown criteria: `(({api_name}:{operator}:{value}) and/or ({api_name}:{operator}:{value}))` Performs a search based on the following format: `(({field_API_name}:{operator}:{value}) and/or ({field_API_name}:{operator}:{value}))` Replace `{field_API_name}`, `{operator}`, and `{value}` with the appropriate field API name, condition, and value. **Key Points:** - You can search for a maximum of **10 criteria** (with same or different columns) - The only operator that is supported for **encrypted fields** is `equals` - When using the `equals` operator in the Search API, it behaves like `contains`, retrieving records that include the specified value **Single Condition:** If the condition is `(Company:equals:ABC)`, the response will include records with "ABC" as well as "ABC Inc" in the Company field. **Multiple Conditions:** `equals` still behaves like `contains`. For example, `((Company:equals:ABC) and (First_Name:starts_with:M))`, it retrieves records where the "First Name" starts with "M" and the "Company" contains "ABC" (e.g., "ABC" or "ABC Inc."). **Note:** The above behaviour does not apply to the **picklist field type**. **IN Operator:** The `in` operator checks if a field's value matches any value in a given list. For example, `(Full_Name:in:Patricia,Boyle,Kate)`, it retrieves records where the Full Name is Patricia, Boyle, or Kate. **Special Character Handling:** When a single-line field value contains characters such as `{`, `}`, `[`, `]`, `^`, `:`, `-`, `/`, `!`, `?`, `*`, `_`, `@`, space, the Search API returns records with similar-looking values, even if the characters are not an exact match. For example, if Record A has the field value `sales-team@zoho.com` and Record B has `sales_team@zoho.com`, a search using `equals:sales-team@zoho.com` may return both records. **Escaping Special Characters:** When using parentheses `()`, commas `,`, or a backslash `\` as the last character in a search value, follow these steps: 1. Escape special characters using a backslash `\` 2. Encode the value before making the API request. Select the value of the criteria, right-click the value, and choose the EncodeURIComponent option. **Example 1: Escaping Parentheses and Commas** - Search term: `((Last_Name:equals:Burns,B) and (First_Name:starts_with:M))` - Escape the comma `\,`: `((Last_Name:equals:Burns\,B) and (First_Name:starts_with:M))` - Encode the value: `((Last_Name:equals:Burns%5C%2CB) and (First_Name:starts_with:M))` **Example 2: Escaping a Backslash at the End** - Search term: `(Last_Name:equals:K\)` - Escape the backslash `\\`: `(Last_Name:equals:K\\)` - Encode the value: `(Last_Name:equals:K%5C%5C)` **Supported Data Types:** `picklist`, `owner_lookup`, `user_lookup`, `lookup`, `phone`, `email`, `date`, `datetime`, `text`, `textarea`, `integer`, `currency`, `decimal`, `multiselectpicklist`, `bigint`, `percent`, `formula`, `website`, `boolean`, `double` **Supported Operators:** `equals`, `starts_with`, `in`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between` **Operator Compatibility by Data Type:** | Data Type | equals | starts_with | in | not_equal | greater_equal | greater_than | less_equal | less_than | between | |---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | **text** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **textarea** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **email** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **phone** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **website** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **picklist** | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **multiselectpicklist** | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **lookup** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **owner_lookup** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **user_lookup** | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **boolean** | ✓ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | | **integer** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **bigint** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **currency** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **decimal** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **double** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **percent** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **date** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **datetime** | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | **formula** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | **Legend:** ✓ = Supported, ✗ = Not Supported **Note:** Refer to the Zoho CRM API documentation for the most up-to-date operator compatibility information.
filtersoneOfFilter for fetching specific custom views based on criteria
include_filtersstringTo include inner details of criteria and cross filters
cross_filtersstringCross filter criteria for related module records
convertedstringSpecify the conversion status to filter the count to lead records. This parameter is supported only for the **Leads** module. Possible values: **true** - Count only converted leads. **false** - Count only unconverted leads. **both** - Count leads regardless of conversion status.
One oftruefalseboth
approvedstringSpecify the approval status to filter the count to lead records. This parameter is supported only for the **Leads** module. Possible values: **true** - Count only approved leads. **false** - Count only unapproved leads. **both** - Count leads regardless of approval status.
One oftruefalseboth
pageinteger (int32)Specify the page number to retrieve when paginating through results.
Default 1
per_pageinteger (int32)Specify the number of records to include per page.
Default 200
typestringSpecify the type of user records to count. This parameter is supported only for the **Users** module. Possible values: **AllUsers** - All users. **ActiveUsers** - Active users. **DeactiveUsers** - Deactivated users. **ConfirmedUsers** - Confirmed users. **ConfirmedReportingUsers** - Confirmed users with reporting access. **NotConfirmedUsers** - Unconfirmed users. **DeletedUsers** - Deleted users. **ActiveConfirmedUsers** - Active and confirmed users. **AdminUsers** - Users with administrator privileges. **ActiveConfirmedAdmins** - Active, confirmed users with administrator privileges. **CurrentUser** - The currently authenticated user.
One ofAllUsersActiveUsersDeactiveUsersConfirmedUsersConfirmedReportingUsersNotConfirmedUsersDeletedUsersActiveConfirmedUsersAdminUsersActiveConfirmedAdminsCurrentUser
Response
Returns 200 with an object. Read it in later steps with {{countRecordsInAModule.response.data.<field>}}.
countinteger (int32)Represents the total number of records matching the specified filter criteria. Always returned in the response.
{
"count": 0
}
Need more? See the Zoho CRM guide for connection setup and behaviour shared by every action.