Working with Zoho CRM APIs Using the zoho-crm Skill

Working with Zoho CRM APIs Using the zoho-crm Skill

The zoho-crm skill makes it easier to work with Zoho CRM APIs without having to remember every endpoint, request structure, or piece of documentation for a given requirement. You describe what you want to build, and the skill determines the appropriate CRM capability and uses the relevant references to construct the solution. It currently supports REST APIs, Deluge Functions, Client Scripts, Widgets, COQL, Queries, and Connections, with more capabilities planned.

This follows on from Getting Started with zoho-crm SKILL.md, which covers installing the skill itself.

A Worked Example: Lead Qualification Workflow

Consider a requirement where, whenever a Lead is qualified, three things should happen: set the Lead's Priority to Hot, create a follow-up task due one day later, and send the Lead's details to an external system via webhook. Rather than researching each API and its request structure individually, the requirement can be given directly to an AI coding agent with the zoho-crm skill installed. This example uses GitHub Copilot as the agent.

Step 1: The Field Update Action

Prompt: /zoho-crm Create an automation field update action for Leads module that sets the Priority field to "Hot". Give me the curl request.

The skill identifies this as a Workflow Field Update API requirement, checks the relevant reference for the endpoint, request structure, and required parameters, and generates the request with the organisation-specific field information needed. Where a field ID is required, it identifies that the value has to come from CRM metadata rather than expecting you to already know it, and points to the API that retrieves it. It also identifies the OAuth scope the request needs, so the right permissions can be configured before the call is made. Running the generated request returns an action ID, used later when the workflow itself is created.

Step 2: The Task Action

Prompt: /zoho-crm Create a Zoho CRM workflow task action for the Leads module that creates a follow-up task titled "follow up with qualified lead" with the due date set to 1 day after the workflow is triggered. Give me the cURL request.

The skill identifies this as a Workflow Task requirement, loads the relevant API reference, and works out the mandatory fields, task subject, due date, status, and priority. For the due date specifically, it constructs the request relative to the workflow's execution time and adds the one-day offset. As with the field update, it identifies any organisation-specific field IDs needed and points to the Fields Metadata API if they aren't already known. Running the resulting request returns a second action ID.

Step 3: The Webhook Action

Prompt: /zoho-crm Create an automation webhook action for the Leads module that sends the Lead ID, Lead Name, Email and Phone to this endpoint: [your endpoint URL]. Give me the cURL request.

The skill identifies this as a Workflow Webhook action and refers to the webhook API documentation, including mapping the requested CRM fields, Lead ID, Lead Name, Email, and Phone, to the payload sent to the external endpoint using Zoho CRM merge fields. It checks the required OAuth scope and request structure before generating the cURL command. Running it returns a third action ID.

Step 4: Bringing It Together as a Workflow Rule

With all three action IDs in hand, the final step is the workflow rule itself, triggered when Lead Status changes to Qualified and executing all three actions.

Prompt: /zoho-crm Give me the request body JSON to create a workflow rule named "Qualified Lead Follow Up" in the Leads module. Trigger when Lead_Status is changed to "Qualified". Configure these as instant actions: Field Update: [action ID], Task: [action ID], Webhook: [action ID]

The skill identifies this as a Workflow Rule request, works out how the field-update trigger should be represented, associates the three existing action IDs as instant actions, and constructs the request body, including module, trigger criteria, and actions, using the relevant workflow API reference.

The point of the example: starting from a plain business requirement, rather than working out the individual APIs and constructing each request by hand, the skill identifies the appropriate APIs, refers to the relevant documentation itself, and builds the requests needed to assemble the complete workflow.

Using the Skill as a CRM API Guide, Not Just a Request Generator

Beyond generating requests, the skill can act as a knowledgeable guide: explaining how a particular API works, helping determine which API actually fits a requirement, and clarifying request and response structure.

Prompt: /zoho-crm Retrieve Leads whose Lead Status is Qualified and whose Score is greater than 25, and include details from the Account associated with each Lead (such as Account Name and Account Industry).

Here the skill identifies COQL as the right API for the requirement, checks the relevant reference for endpoint, required scopes, request structure, field names, and response format, and can explain how COQL compares with alternatives such as Get Records and Search Records, and why it suits this particular case better.

Zoho has indicated more capabilities of the zoho-crm skill, covering the other CRM developer tools, will be explored in further posts in the Kaizen series.
Need help? 1 Cloud Consultants can help you use the zoho-crm skill to build workflow automations and API integrations for your Zoho CRM. Book a discovery call with 1 Cloud Consultants.