The zoho-crm skill makes it easier to work with Zoho CRM without having to remember every API endpoint, request structure, or the documentation needed for a particular requirement. You can describe what you want to build, and the skill determines the appropriate CRM capability and uses the relevant references to come up with the solution.
As of now, the skill supports REST APIs, Deluge Functions, Client Scripts, Widgets, COQL, Queries, and Connections, with more capabilities to be added over time.
In this Kaizen, we will look at how the skill can help you when you are working with Zoho CRM APIs.
For the demo, I have already installed the zoho-crm skill in my project and will be using GitHub Copilot. We will use a Lead management requirement and see how the skill helps us identify the required APIs and construct the requests.
We will start with individual actions and then combine them into a workflow.
To see how the zoho-crm skill helps with API usage, let us take a Lead management requirement.
Assume that whenever a Lead is qualified, we want to perform the following actions:
Set the Lead's Priority to Hot
Create a follow-up task for the Lead, due one day after the workflow is triggered
Send the Lead details to an external system using a webhook
Instead of looking for the appropriate API, going through the documentation, and figuring out the request structure for each of these requirements, we can provide the requirement to an AI coding agent with the zoho-crm skill.
The skill identifies the relevant CRM API, loads the required API references, and generates the request based on the requirement.
For this demonstration, we will use GitHub Copilot as the AI coding agent.
We will start by creating a Workflow Field Update action for the Leads module. The requirement is to set the Lead's Priority field to Hot when the action is executed. We can provide this requirement to the AI coding agent with the zoho-crm skill.
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 zoho-crm skill first identifies that this requirement should be handled using the Workflow Field Update API. It then checks the relevant API reference to understand the endpoint, request structure, required parameters, and OAuth scope.
The generated request contains the organization-specific field information required for the Field Update action. Where an ID is required, the skill identifies that the value needs to be obtained from CRM metadata rather than asking us to manually figure out where it comes from. It also identifies the API that can be used to retrieve the required field details. We can use that API to get the field ID, replace the placeholder in the generated cURL request, and execute the request. The skill also identifies the OAuth scope required for the request, so you know exactly what permissions to configure before making the call.
The generated cURL request can then be executed to create the Field Update action in Zoho CRM. The response gives us the action ID, which we will use later when creating the workflow.
Next, we will create the Task action that needs to be associated with the workflow.
The requirement is to create a follow-up task titled "follow up with qualified lead", with the due date set to one day after the workflow is triggered.
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 and loads the relevant Task Action API reference. It checks the API structure and the mandatory fields required for creating the task action, such as the task subject, due date, status, and priority.
For the due date, the skill also needs to represent the requirement relative to the workflow execution time. It constructs the request using the workflow execution time as the starting point and adds one day to it. The skill also identifies the organization-specific field IDs required for the Task action. If these IDs are not already available, it points to the CRM Fields Metadata API that can be used to retrieve the field details for the Tasks module.
Based on these references, the skill generates the cURL request for creating the Task action. The generated cURL request can then be executed to create the Task action in Zoho CRM. The response gives us the action ID, which we will use later when creating the workflow.
The third action is a webhook that sends the Lead details to an external system.
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 : https://webhook.site/b89a8c65-8623-4af4-b579-8fa1853ad615. Give me the cURL request.
Here, the skill identifies that this is a Workflow Webhook action and refers to the corresponding Webhook API documentation. It also takes care of an important part of the request; mapping CRM fields to the data that needs to be sent to the external endpoint.
The generated request uses Zoho CRM merge fields to populate the webhook payload when the workflow executes. In our case, the payload contains the Lead ID, Lead Name, Email, and Phone. The skill also checks the API requirements, including the required OAuth scope and the structure of the webhook request, before generating the cURL.
We can then execute the generated cURL request to create the webhook action in Zoho CRM. The response gives us the action ID, which we will need when we define the workflow.
At this point, we have the three actions required for our use case:
A Field Update to set Priority to Hot
A Task to follow up with the qualified Lead
A Webhook to send the Lead details to an external system
The next step is to bring these three actions together and create the workflow rule that will execute them when a Lead is qualified.
We now have all three actions ready. The final step is to create a workflow rule that brings them together.
For our use case, the workflow should run when the Lead Status is changed to Qualified. Once the workflow is triggered, it should execute the Field Update, Task, and Webhook actions we created earlier. Instead of manually working out the workflow API request structure, we can give the requirement to the skill along with the action IDs.
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: 4876876000025812036
- Task: 4876876000025831002
- Webhook: 4876876000025864002
The skill identifies this as a Workflow Rule API request. It determines how the field-update trigger needs to be represented and how the existing action IDs should be associated with the workflow as instant actions. It also uses the relevant workflow API reference to construct the request body, including the module, trigger criteria, and actions.
The skill generates the request body JSON, which we can use in the Workflow Rules API request.
So, the complete flow is now in place:
This is where the value of using the skill becomes more apparent. We started with a business requirement and, rather than having to determine the individual APIs and construct each request manually, the skill helped us identify the appropriate APIs, refer to the relevant documentation, and build the requests needed to put the complete workflow together.
The zoho-crm skill can also act as a knowledgeable guide when working with CRM APIs. Instead of using it only to generate a request, you can use it to understand how a particular API works, determine which API is appropriate for a requirement, and get guidance on the request and response structure.
In other words, you can treat the skill as a Zoho CRM expert that you can consult while building your solution.
For example, consider the following requirement:
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).
The skill identifies COQL as the appropriate API for this requirement. It checks the relevant references and API specification to determine the endpoint, required scopes, request structure, field names, and response format. It can also explain how COQL compares with other record retrieval APIs such as Get Records and Search Records, and why it is better suited to this particular requirement.
If you have doubts about a Zoho CRM API, the skill can help you understand the API, work through its request and response structure, and determine how it applies to your requirement.
In the upcoming weeks, we will explore more capabilities of the zoho-crm skill and see how it can help with the other developer tools available in Zoho CRM.
If you have questions about the skill, APIs, or any of the capabilities covered in this series, feel free to drop a comment below or reach out to us at support@zohocrm.com. We would also love to hear about the use cases you are exploring with the zoho-crm skill.
