Extension Pointers #8: Handling real-time data updates between Zoho CRM and third-party applications using webhooks

Extension Pointers #8: Handling real-time data updates between Zoho CRM and third-party applications using webhooks

A webhook is a web callback triggered by a specific event to provide real-time data updates between applications.


How does a webhook work?

Webhooks help enhance the connection between two applications. When an event occurs in a web application that implements a webhook, the webhook notices the event, serializes and collects the data, and posts the data to the URL configured in the form of a HTTP request.

You can implement either an inbound webhook or an outbound webhook. If an event triggered in your Zoho CRM account causes an action in a third-party application, it is called as an outbound webhook (going from your application to a third-party application) and the opposite is called an inbound webhook (incoming to your application from the third-party application).

How functions play a role in implementing webhooks

If Zoho CRM should be notified when a particular event occurs at the third-party end, you can create webhooks to post a callback on the occurrence of that event. In order to implement this, you need to define a function in your extension that can be triggered from the third-party application. Unlike standard functions, REST API functions can be triggered from anywhere (either from an extension or a third-party application) and thus help with timely interaction. 

Webhook URLs and how to obtain them

You need to create a webhook and subscribe to events for real-time updates between applications. In order to create a webhook, a webhook URL is required. By subscribing your own webhook URL, you can customize, extend and integrate it with other third-party applications, facilitating instant web notifications.

The REST API functions/Standalone deluge functions can be written and exposed as REST APIs. The API names of these functions can be used as the webhook URL while creating your webhook.

In this post, we'll look at the basic steps on how to create an inbound webhook, where a third-party application event triggers a post-data action to your Zoho CRM account.

Note: The term "event" here refers only to the events supported by the third-party application, which you can subscribe during the creation of a webhook.

The steps to achieve this functionality while building your extension are:

➤ Establish a connection with your selected third-party application.
➤ Define a REST API function, to handle the response from the third party application.
Subscribe the webhook URL of the REST API function with the third-party application.




Establishing connection with the third-party application

1. Before proceeding with implementation, it is important to check whether the third-party application supports webhooks. Establish a connection between Zoho CRM and the third-party application using the authentication methods supported by the application. You can learn more about the authentication methods for developing third-party integrations here.

2. If the method of user authentication supported by the third-party application is
3. Define the third-party application's API to create a webhook with the required parameters specified by the third-party application.

Note: The subscription URL is termed in different ways by each application and is an important parameter to be noted while creating webhooks. In order to send the response to Zoho CRM, the third-party applications require a URL to perform HTTP POST request from their end. The following section defines the steps required to obtain this URL.

Defining a REST API function and obtaining a webhook URL

After establishing the connection, the next step is to define a REST API function that can be invoked by the third-party application whenever a subscribed event occurs in the third-party application.

1.  Log in to Zoho Sigma and go to the Extension Details page.
2. Choose Functions under Automate from the left panel of the Zoho Developer console under Build, then click New Function.



3. Enter the name of the function. Choose Yes for the Invoke as REST API option to create the function as a REST API function.



4. The crmAPIRequest argument of the function is categorized as Map type by default. The entire request object is mapped automatically to the crmAPIRequest argument and holds the response from the third-party when the trigger event occurs.



5. The input for the function can be acquired from the following types:

Component
Format
Value fetched using component of crmAPIRequest
 body
request_body =   crmAPIRequest.get("body");
Content that is passed as a stream to the request
 params
parameters = crmAPIRequest.get("params");
Key-value pair or as JSON object to the request
 file_content
filecontent = crmAPIRequest.get("file_content");
File content passed to the request
 user_info
user_info = crmAPIRequest.get("user_info");
Information about the user

 method
method = crmAPIRequest.get("method");
HTTP method name in the request
 auth_type
authtype = crmAPIRequest.get("auth_type");
The name of the Authentication method(API key)
 headers
headers = crmAPIRequest.get("headers");
Additional information of the request available in the header

6. The default return type of a Rest API function version 2.0 is a string. You can choose to return the response as a string or use the response object crmAPIResponse to define the following specifications of the response:

 Specification key
 Default value
 status_code
 200
 Content-Type
 application/json;charset=utf-8
 headers
 {"Content-Disposition", "attachment;filename=response.json"}
 body
 empty

7. When you have finished defining the REST API code, click Invoke as the REST API button.


8. The URLs to invoke the function will be displayed and are termed as webhook URLs, which will be used for subscribing the function with the third-party.


Unlike the sandbox URL provided with a predefined ZAPI key, the production URL requires the value of the user's ZAPI key.

Why ZAPI key?

For authentication purposes, the REST API functions use API keys as the method of authentication. It requires the value of the ZAPI key in order to authenticate a user.

Code snippet to obtain ZAPI Key
  m = {"nameSpace":"<portal_name.extension_namespace>"};
  apikeyresp = zoho.crm.invokeConnector("crm.zapikey",m);
  zapikey = apikeyresp.get("response");

9. The ZAPI key value can be passed in the Production URL, which will serve as a webhook URL to subscribe a webhook and invoke this function.

Creating and subscribing a webhook

➤ REST API functions can be triggered from a third-party application only when it is subscribed with that application while creating an inbound webhook.

➤ The webhook URL mentioned in the previous section will serve as the subscription URL while creating the webhook.

By following these steps, you can implement webhooks for third-party integrations using REST API functions. In our upcoming post, we'll look at a working example depicting this process.

We hope you found this guide helpful in creating and using custom webhooks to link your Zoho CRM account to third-party applications.For tips and guides like this, keep following this community forum.

SEE ALSO




    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




                                                            • Sticky Posts

                                                            • Kaizen #197: Frequently Asked Questions on GraphQL APIs

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                              Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

                                                              Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
                                                            • Kaizen #193: Creating different fields in Zoho CRM through API

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Client Script | Update - Introducing Commands in Client Script!

                                                              Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands


                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • Zoho project – Workdrive integration.

                                                                                                              Hello everyone, I was wondering something, we did the Zoho projects integration with Zoho Workdrive but nowhere during this integration we could set the location of the folders that would be automatically created in Workdrive. As I understand it, it creates
                                                                                                            • Scriptを埋め込みたくてOn User Inputを探しているのですが・・・

                                                                                                              編集モードで、Scriptを埋め込みたい項目を選択し、「項目のプロパティ」パネルで、その下のほうに「フィールドアクション(Field Actions)」という見出しがあると聞いたのですが、そもそも、それが見つかりません。そのために、On User Inputなどのイベントが選べません。 画面の英語を日本語に訳しているためにわけわからん状態になっているのかも知れませんが、わかる方、いらっしゃいますか?
                                                                                                            • Problem with cloud query exceeded

                                                                                                              When making a call I get this error, It is associated with a function in node that calls external APIs This is the code //tokenConsultar = thisapp.ObtenerToken(); //input.token = tokenConsultar.get("output").toMap().get("token");
                                                                                                            • Showing Total of Funnel Chart Legend (With Values) Items

                                                                                                              Hi, We are using the funnel type chart for displaying our zCRM sales pipeline stages and associated sum of deals in each stage.  We have configured the legend to show the associated value (Deal Amount (Sum)) for each stage adjacent to the legend items (Stages). Is there a way to display the total of the values in the same chart?  For example, at the bottom of the legend or maybe as a #merge placeholder in the legend title?
                                                                                                            • How to Convert VCF Contacts to CSV using Excel

                                                                                                              Many users switch from traditional address books to digital formats like vCard and CSV. These formats allow users to easily manage their contacts. However, a difficulty comes when you need to transfer your contact information to another application or
                                                                                                            • Field authorization for Linking module in Zoho CRM portal

                                                                                                              Hi guys! Currently building a customer portal for one of my clients, and I ran into a bit of a roadblock while using a multi-select lookup field. The issue is that there is no way to hide or define access in the linking module created by this multi-select
                                                                                                            • Kaizen #63 - Layout Rules in Zoho CRM

                                                                                                              Hello and welcome to another week of Kaizen! This week, we will be discussing Layout Rules in Zoho CRM. If you need to modify the layout of a module based on user inputs, or to show or hide sections based on the value of a specific field, we have got
                                                                                                            • Zoho CRM Portals - allow access per account

                                                                                                              Hello all, I am trying to set up a portal for our customer but I seem to be hitting an obstacle and I am not sure if it is my problem or a limitation in the software. So basically the way I understand the portal Contact Email > Each Record or Related
                                                                                                            • Android - Writer não acentua em Português com teclado bluetooth

                                                                                                              Gosto muito do Zoho, tanto o Note quando o Writer. Infelizmente, o Writer sofre de um problema sério: ao usar um teclado bluetooth, forma mais cômoda de lidar com um processador de texto, os acentos (todos!) da Língua Portuguesa não são aceitos. Todos
                                                                                                            • Set File Upload fields as mandatory

                                                                                                              Currently the CRM for some reason lacks the ability to set a file upload field as mandatory So we have an issue We have a requirement that before a Deal stage is set as Deal is Won the member needs to upload a file Now for some weird reason in Zoho I
                                                                                                            • Editing HTML in Zoho CRM Email Template

                                                                                                              I am trying to create a template within the CRM email option, but need to be able to use custom HTML. There does not seem to be a way to do so.
                                                                                                            • Ability to CC on a mass email

                                                                                                              Ability to CC someone on a mass email.
                                                                                                            • How to make attachments mandatory

                                                                                                              I want the user to be unable to mark an opportunity as Closed – Won if it doesn’t have any attachments. I’ve already tried client scripts and functions, but nothing worked.
                                                                                                            • SLA ticket report

                                                                                                              From data to decisions: A deep dive into ticketing system reports Service level agreement (SLA) ticket reports in a help desk system are crucial for ensuring that services are delivered according to established commitments. They help maintain accountability
                                                                                                            • Zoho Backstage - PCI Compliance / Web Security

                                                                                                              I have a couple of questions related to Backstage and payment processing.... 1. my purchasing division is not giving approval to use Backstage yet because of some security issues. In order for us to take payments via a payment gateway like Authorize.net
                                                                                                            • Zoho Tables August 2025 Update: Faster and Smoother

                                                                                                              We’ve been working behind the scenes to make Zoho Tables faster, lighter, and more reliable. Here are the highlights: Faster Response Times Optimised the way responses are generated. Reduced memory consumption by 20–25%, leading to smoother performance
                                                                                                            • Video Upload from app says "unsupported aspect ratio" but is verified to be correct.

                                                                                                              I and my social media person are experiencing a problem where Social will not accept video uploads to Instagram. The error we receive is "unsupported aspect ratio" but looking directly at the file in question we see that the width and ratio both match
                                                                                                            • Disposable Email Addresses

                                                                                                              Dear zMail Team, Can you also bring out a few disposable email addresses for each accounts? That way occasional registrations and imminent spam from them can be largely solved right? ---- Deepak Vasudevan http://thamizhththendral.blogspot.com/
                                                                                                            • Zoho sheet - Zoho expense

                                                                                                              I want to schedule to create an expense using Zoho Sheet and flow. That is the EMI that I pay on a particular date to the bank and should be itemised, like principal and interest on the loan. Can someone help me in this regard??
                                                                                                            • Ability to configure a schedule/shift for each user and/or crew in Zoho FSM

                                                                                                              Hello, In our team of Field Agents, we have different shifts. Some field agent always work from 7:00 AM to 4:00 PM while others work the evening shift like 4:00 PM to 11:00 PM. Sometime shift are on weekdays only or on weekend. It would be great to be
                                                                                                            • Free webinar: Streamlining customer service paperwork with the Zoho Sign extension for Zoho Desk

                                                                                                              Hello Everyone! Have you been wondering about bridging the gap between digitised customer service and business paperwork? Join our free webinar to learn how you can do this by connecting Zoho Sign, our digital signature app, with Zoho Desk, our online
                                                                                                            • Zoho Books | Product updates | July 2025

                                                                                                              Hello users, We’ve rolled out new features and enhancements in Zoho Books. From plan-based trials to the option to mark PDF templates as inactive, explore the updates designed to enhance your bookkeeping experience. Introducing Plan Based Trials in Zoho
                                                                                                            • Mail Search should allow grouping by conversation like Gmail.

                                                                                                              Having switched from gmail I have found the search function hard to use. Mostly because mail is not grouped by conversation in search. If I search for a word when looking for a conversation had with someone then sometimes 10 emails will come up from the
                                                                                                            • Improve Zoho Learn updated article notifications

                                                                                                              I noticed today while updating an article, that the notification users get says "[User Name] has published article [Article Name]..." My feedback to the product team is that it would be really helpful for an end user, if the system notification differentiated
                                                                                                            • Safari Support

                                                                                                              Safari, the world's second largest browser, zoho desk does not officially or fully support. That needs to change.
                                                                                                            • Can I get images from an "Image Upload" field in a webhook?

                                                                                                              I want to send images from 2 "image upload" fields via a webhook. Is this possible?
                                                                                                            • Ticket closure notification - all contacts cc'd on email thread

                                                                                                              Hello, If a client sends an email to our service desk and cc's in other people that work at the same company - so that they are in the loop of the service request. When the we close the ticket, only the ticket owner (person who emailed us - which created
                                                                                                            • Inactive account cleanup policy for Zoho Sign

                                                                                                              Zoho Sign reserves the right to delete accounts that are license free and inactive for more than 120 days. The account deletion will be initiated only after the user receives prior email notice about possible data deletion and how to backup the data.
                                                                                                            • Missde API documentation for Sales Receipt

                                                                                                              Hi! I noticed that the Sales Receipt endpoint is not currently listed in your API documentation (https://www.zoho.com/books/api/v3/introduction/). Could you please provide any available temporary documentation for this endpoint, along with a detailed
                                                                                                            • Multi-currency in Zoho CRM Forecast and Reports

                                                                                                              As a company we have branches in 4 different countries with as many different currencies. Our Sales Teams would like to work with their local currency as much as possible. The Forecast module using only 1 currency is practically usable only by the sales
                                                                                                            • How to select from pricebook when creating a salesorder or quote

                                                                                                              I am creating a sales order and when selecting the Products I do not see any where to select from pricebooks. How do i associate this to my orders?
                                                                                                            • Proposal for Creating a Unique "Address" Entity in Zoho FSM

                                                                                                              The "Address" entity is one of the most critical components for a service-oriented company. While homeowners may change and servicing companies may vary, the address itself remains constant. This constancy is essential for subsequent services, as it provides
                                                                                                            • Automatic Matching from Bank Statements / Feeds

                                                                                                              Is it possible to have transactions from a feed or bank statement automatically match when certain criteria are met? My use case, which is pretty broadly applicable, is e-commerce transactions for merchant services accounts (clearing accounts). In these
                                                                                                            • I cannot find my older documents from 2024 and 2023

                                                                                                              I cannot find my older documents from 2024 and 2023.
                                                                                                            • System default SLA descriptions can't be modified

                                                                                                              The system default SLAs have identical descriptions for all SLA levels, but their settings differ. However, I am facing an issue where I cannot modify these descriptions and save the changes. The content of the description box can be edited but the changes
                                                                                                            • Customising Help Center

                                                                                                              Hi I don't think it is possible to add custom pages to help center? We'd like to use this as a customer portal with support tickets, FAQ/Guides, Billing and contracts. Is there any plans to add a feature like this or an alternative way to do it other
                                                                                                            • Replies sometimes creating separate ticket

                                                                                                              Sometimes when a customer responds to an email coming from Zoho Desk, instead of adding a reply to the original ticket, a separate ticket is created. This happens even though the response subject line contained the ticket number, and the person responding
                                                                                                            • Ticket Approvals - External Users

                                                                                                              The ticket approval option - we need to be able to select external users (Contacts) for approvals. Sometimes we are working with an end user and their boss needs to approve a purchase. For example, working with a cashier on a broken cash register and
                                                                                                            • Force Users to Ask Answer Bot a question... First

                                                                                                              End users will always skip talking to a bot. It would be nice if Zoho adopted the standard and forced users to first ask a question to answer bot (or zia in some fashion) and then pass to the agent if it wasn't answered. Options to force the user to speak
                                                                                                            • View Answer Bot conversations?

                                                                                                              We are trialing Zia and are experimenting with Answer Bot on our knowledge base. So far so good! Management asks me if it is possible to view Answer Bot conversations, the purpose being to look over its shoulder and confirm that it is working as des
                                                                                                            • Next Page