Building a Simple Microservice

Build a simple microservice using Catalyst Basic I/O Functions and integrate it with Zoho CRM to send automated counter-based email alerts when more than a specific number of leads are created

Integrate the Function with Zoho CRM

Let's now integrate this function with Zoho CRM by creating a workflow rule with a webhook associated to it.

You can go through the help resources for Zoho CRM to understand it better. To learn about Workflow Management refer to this help page. To learn about Webhooks, refer to this help page.

To integrate the function with Zoho CRM:

  1. Navigate to Setup and then Workflow Rules under the Automation section.
  2. Click Create Rule in the Workflow Rules page.
  3. Select the Leads module and enter the rule name and description in the pop-up box as displayed below. Click Next.
  4. Select Create and click Next.
  5. Select All Leads and click Next.
  6. Click Instant Actions and select Webhooks.
  7. Enter the details as displayed below in the pop-up box.

    You can obtain the Function URL from the Catalyst console or from the CLI as discussed in the previous step. You must append this at the end of the Function URL as shown in the picture: "?feature_name=CRM&mail_count_threshold=5".
    Select the HTTP method as GET. Click Save and Associate.

The workflow rule will now be saved and webhook will be associated with it. We have defined the threshold as '5'. Therefore, if more than 5 leads are created in the Leads module, the email alert will be sent automatically.

The microservice is now functional and will work without any errors.