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




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          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

                                                                                                          • Make other sub fields mandatory, if first subfield is not empty

                                                                                                            I am not finding an option in the rules to make other sub fields mandatory if the first sub field is not empty. I am using the name field to collect parts info, with sub fields of Part Name, Part Number, and Quantity. But I don't want these mandatory
                                                                                                          • Is Zoho Marketing Plus part of Zoho One?

                                                                                                            Hi, Is the new fancy Zoho Marketing Plus part of the Zoho One package? Is there any benefit in using this rather than the standalone products? Many thanks Jon
                                                                                                          • Ability to Initiate WhatsApp Template Messages in Zoho SalesIQ Without Preexisting Chat

                                                                                                            Hi Zoho SalesIQ Team, I hope you're doing well. I understand that with the WhatsApp integration in SalesIQ, clients can contact us via WhatsApp, and we can use WhatsApp templates to send messages outside of the 24-hour window by reopening an existing
                                                                                                          • Duplicating Forms doesn't duplicate Forms attachment path to workdrive

                                                                                                            Hi, I have this user, who uses one forms and duplicates it when needed and update the content. For him, it's important to have the submission forms saved in a specific folder inside Workdrive (as this PDF is transmitted later to another team). However,
                                                                                                          • Zoho Creator Mobile app no Default Workspace

                                                                                                            When I use the Zoho Creator mobile app I do not get a default workspace. This is occurring for me and another new user. I believe this is an issue with Zoho One / Zoho Creator. I have tried working with support and it's been over a week of no solution
                                                                                                          • Kaizen #189: Manipulating Multi-Module Lookup (MML) Field using Zoho CRM APIs

                                                                                                            Hello everyone! Welcome back to another week of Kaizen. In this post, we explore the Multi-Module Lookup (MML) field in the Appointments module of Zoho CRM. You learn what an MML field is, how it works, and how to use it with Zoho CRM APIs. Table of Contents:
                                                                                                          • Xcode 16.2

                                                                                                            I am facing multiple bitcode enable issue with Zoho. Which version is compatible with xcode 16.2 or version with out bitcode Flutter 3.27.4 pod 'ZohoDeskPortalCore' pod 'ZohoDeskPortalServices'
                                                                                                          • Unable to invite contacts

                                                                                                            Hi! I'm unable to invite contacts as end-users from my trial account. The green pop-up displays "Invited succesfully" but the email never arrives, nor the re-invitation - even though it's "sucessfully" as well. Tried with several e-mail accounts, even
                                                                                                          • Set expiration date on document and send reminder

                                                                                                            We have many company documents( for example business registration), work VISA documents. It will be nice if we can set a expiry date and set reminders ( for example 90 days, 60 days, 30 days etc.,) Does Zoho workdrive provide that option?
                                                                                                          • Refresh Page Or View After Workflow-Triggered Rule

                                                                                                            Good Morning, Is this feature that's discussed on this CRM thread available on Recruit? https://help.zoho.com/portal/en/community/topic/refresh-page-or-view-after-workflow-triggered-rule
                                                                                                          • Forward, attach, or flag email to an open ticket.

                                                                                                            Hi, when resolving customer requests through tickets in Zoho Desk, it is very common to receive emails from suppliers or third parties in Zoho Mail accounts or email groups that are not registered in the system. Is there any way to forward these emails
                                                                                                          • Share passwords/secrets and folders/chambers with external users

                                                                                                            Currently you allow sharing passwords with internal users, internal user groups, and third parties. The third party feature gives temporary access of 30 minutes and it does not have any sign up. What we really need is to properly share secrets/passwords (and ideally folders/chambers) with Zoho Vault users that are not part of our organisation - even if they are on the free plan. If they accept the share, the password would be stored in their Zoho Vault as long as I maintain the share. If I revoke
                                                                                                          • Need help adding Zoho Vault License

                                                                                                            "Proceed" is grayed our when i try to add 5 more license on our Zoho Vault account. Thanks
                                                                                                          • Notifications no longer being sent to my email address for any scheduled events

                                                                                                            The last few weeks, I stopped receiving email notifications to my email for events I have scheduled and have a selected reminder option checked.
                                                                                                          • 'call for best price' option

                                                                                                            Hi guys, Pricing of items that we sell to end-customers changes often, so I don't want to put up a 'static' price, but would like to have the option to 'call for best price', or what-ever the best wording is.. Has anybody got a suggestion on how to do
                                                                                                          • Modifying product search in invoice field

                                                                                                            Hello, I imported my product list in Books. Since I have many products with the same name, but with different order units, and that Books doesn't permit same names in items, I used ID's number has product name, and put the product name in the description.
                                                                                                          • How do I embed the webinar into a webpage?

                                                                                                            All I can seem to do is embed the signup form. This is cheesy. Surely they must have fixed this by now, right? How do I do it?
                                                                                                          • Bulk upload image option in Zoho Commerce

                                                                                                            I dont know if I am not looking into it properly but is there no option to bulk upload images along with the products? Like after you upload the products, I will have to upload images one by one again? Can someone help me out here? And what should I enter
                                                                                                          • 404 Error When Using record_cursor in ZOHO.CREATOR.DATA.getRecords (js api)

                                                                                                            Iam working on fetching all records from a Zoho Creator report using the Get Records API (V2.1) with the following recursive function: js CopyEdit // Recursive function to fetch records using record_cursor from the response function fetchAllRecords(recordCursor
                                                                                                          • Add haptic feedback when QR / barcode is scanned

                                                                                                            Hi, One of my user has a Creator App and scan QR codes. He suggests a haptic feedback is a great addition to validate that the QR code is effectively scanned and inserted in to the field. He is using an iPad for scanning. Thank you !
                                                                                                          • Input list of records in Lookup

                                                                                                            Salut, I have 2 scripts that input list of records in a lookup. The first on works fine, the second one doesn't and I do not know why. The only differences, is that the first one input in a lookup a list of records from an actual lookup field, and with
                                                                                                          • Are downloadable product available in Zoho Commerce

                                                                                                            Hi all. We're considering switching to Zoho Commerce for our shop, but we sell software and remote services. Is there a features for downloadable products? I can't find any information about this. Thank you very much Alice
                                                                                                          • Parent-Child Tickets using API or Deluge

                                                                                                            Hi Everyone, We are looking at the parent-child ticketing features in Zoho Desk. We want to be able to create a parent ticket at customer level and nest child tickets underneath. The issue we are facing is to be able to automate this. I'm checking the
                                                                                                          • In line code commenting in Deluge

                                                                                                            A request to enhance readability: currently you can add 'in line' comments for Deluge code, but after you save and reopen, the comments are moved down to the new line. i.e. info "test response"; //this is a info statement for a test response gets changed
                                                                                                          • Delete purchase order

                                                                                                            Buenos días, quisiera su ayuda para retirar los documentos adjuntos, ya que necesito iniciar sesión nuevamente para la venta de unos vehículos.
                                                                                                          • Zoho One Groups and Departments - how are they used ?

                                                                                                            I've seen that Zoho One has the ability to create Groups and Departments, however they don't seem to do anything ? There is no ability to pick up these same groups in ; Zoho Analytics, Zoho Forms, Zoho Vault for just starters . Why aren't the Zoho One
                                                                                                          • Insert Dates Into Subform

                                                                                                            Hi Everyone, Good evening. I've been looking for this all day, but can't find it. Is it possible to insert the entire date inputted from start date and end date into the subform? I also attached the image, to make it clearer. Jadwal Pertemuan = Start
                                                                                                          • Introducing Zoho CRM for Everyone: A reimagined UI, next-gen Ask Zia, timeline view, and more

                                                                                                            Hello Everyone, Your customers may not directly observe your processes or tools, but they can perceive the gaps, missed hand-offs, and frustration that negatively impact their experience. While it is possible to achieve a great customer experience by
                                                                                                          • Default Lookup Field Value based on Picklist

                                                                                                            How do I change a lookup field value based on another field's value, while creating/editing a record using form? I have a picklist of different types of Loans. For example: PPP, EDIL, Term, etc. When I create a record using the form, if I choose PPP from
                                                                                                          • Automate Note Creation for Service Appointments

                                                                                                            Hi Latha, I hope you're doing great. Thank you for your continued support in helping resolve previous issues — it's truly appreciated. I'm currently working on automating another workflow using Deluge in the Service_Appointment module. Specifically, I
                                                                                                          • Date & Time Field | Minimum 24 hour notice.

                                                                                                            I'm trying to use Zoho Forms to build a booking request form. I have the date and time field selected as the field users can select their booking time for. My issue is I need a minimum of 24 hour notice for each appointment. I have it sent to only future
                                                                                                          • I can't understand Quiet Mode

                                                                                                            I want to set my Zoho mail notifications to only show during set times. I only want to see my notification pop-ups from 9am-5pm Monday-Friday. Or, in another words, I don't want to receive pop-up notifications between the hours of 5pm and 9am and for
                                                                                                          • Add Desk Account comments using Flow

                                                                                                            The triggers and actions for Zoho Desk available in Flow are quite extensive, but I don't see anything related to Account-level Comments. There are actions to add comments to Tickets, Contacts, Tasks, and Topics, but nothing for Accounts. Am I missing
                                                                                                          • Add subform record on data import

                                                                                                            I have some data pulled from analytics. I also have a "Projects" form with an "Assignments" subform linked to the "Assignments" form (not a blank form). Now when I edit a Project record, I can add new assignments manually and it will add the records in
                                                                                                          • Update Main Form Date with Most Recent Subform Submission Date

                                                                                                            Hello, I have a field in my main form (equipment info) with the "date of last equipment inspection". I have a subform (equipment inspection) That wheen submitted for a piece of equipment I would like the submission date of the subform (equipment inspection)
                                                                                                          • Need Help with MX Record Verification

                                                                                                            Dear Zoho Mail Support Team, I’m setting up Zoho Mail for my domain "nexiumdynamics.com" and have already added the MX, SPF, and DKIM records as instructed. The domain DNS is managed through Odoo. However, the MX record verification on Zoho Mail is still
                                                                                                          • ¡Participa en los Zoholics Awards 2025!

                                                                                                            ¿Tu organización utiliza el software de Zoho de una forma innovadora? ¿Has logrado resultados dignos de noticia con nuestras aplicaciones? ¿O tienes un caso de uso especial de Zoho que te gustaría compartir con el mundo? Si es así, ¡este es tu momento
                                                                                                          • To be able to create a report sub folder

                                                                                                            Hello Can we request the ability to create subfolders in report folders.
                                                                                                          • Email Stuck in "Retry Queue" – Host Not Reachable

                                                                                                            Hello everyone, I’ve been encountering an issue when trying to send emails. Although the email appears in my Sent folder, it doesn’t reach the recipient, and I see the following status: In Retry Queue Temporary failure when delivering email to the recipients.
                                                                                                          • Identify, Qualify and Retarget Potential Leads Using Zoho SalesIQ & Campaigns

                                                                                                            Finding the right leads can often feel like guesswork. Because not all your website visitors are worth targeting — some may just be browsing, while others may have landed in there by accident. So how do you filter out the noise and focus on those who
                                                                                                          • Next Page