Unlike other modules in CRM, Workflow Rules doesn’t allow you to set “Notes” as a function trigger. Till that day arrives, we have found a workaround that enables function triggering from Notes (create/edit). Here’s the idea:
The following Zoho CRM Connection scope is needed:
id = crmAPIRequest.get("body").get(0);
note = zoho.crm.getRecordById("Notes", id);
Notification APIs allow you to get instant notifications whenever an action is performed (create/update/delete) on the records of a module. The system notifies you of the event to the URL provided. The CRM serverless function API key will be set as the URL here.
param =
{
"watch":
{
{
"channel_id":"1",
"events":{"Notes.create","Notes.edit"},
"channel_expiry":"INSERT_DATE_TIME_HERE",
"notify_url": "INSERT_SERVERLESS_FUNCTION_API_KEY_HERE"
}
}
};
response = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/actions/watch"
type :POST
parameters:param + ""
connection:"INSERT_ZOHO_CRM_CONNECTION_HERE"
];
info response;
Note: To check if your notification is active, you can use the notification details API.
Now that you have enabled notifications, you can test the signal by creating/editing a CRM note. On success, you will be able to see the payload data.
Once this is done, you’re ALL SET! You’ve now successfully set up a Note action (create/edit) as a workflow trigger where you can configure custom actions in the serverless function.
Click here to copy these scripts. For more Zoho-wizardry, check out our GitHub page. And, for more information on Zoho CRM, take a look at our detailed comparison of CRM and its top competitor, HubSpot.
Book a free 30-minutes consultation with a Zoho expert or send us an email