Webhooks: What are they and how are they used?

You might have come across the term “webhooks” in your app settings and questioned whether you should use them. The simple answer is “yes.”

 What is a webhook?

A webhook is also known as a “reverse API.” It is a tool that enables one system or application to communicate and deliver real-time notifications about a specific event to another system or application.

 An introduction to webhooks

A webhook is configured to send push notifications to a specified URL whenever an activity related to a specific event occurs.

 For example, let’s go back in time to the days before online money transfers were possible. If you had to transfer money to someone, you had to write a check or physically go to a bank to initiate the transfer. It might have taken a phone call or two, or a trip back to the bank, to confirm the intended recipient got the money.

Let’s fast-forward to the present. You can now transfer money from your mobile device or computer from anywhere at anytime. When the money is sent to the recipient, you are notified through your registered cell phone number or email address. You don’t need to call anyone or go to the bank to get an updated statement. Banking applications also notify you when your credit card bill is due, your balance is low, or an unauthorized transaction occurs—without any manual intervention. Essentially, this is what a webhook does.

What exactly does a webhook do?

Webhooks provide real-time updates about web activity relevant to your organization. When an event occurs in one system or application, a webhook informs another application or system by sending an HTTP “POST” request to a destination URL.

In order to receive data from a webhook, the specified URL must be public and belong to the receiving system or application. Moreover, it must be configured to act as a webhook endpoint so notifications can be received by the system.

Webhooks vs. APIs

In contrast to webhooks, APIs work by “polling,” meaning your server communicates with the API server to check for new data. Meanwhile, webhooks send the data automatically, which is far more efficient.

A webhook doesn’t require any manual intervention. Once set up, webhooks automatically monitor applications for changes.

What type of remote session or unattended access session activity can I track with a webhook?

Configure webhooks on the Zoho Assist remote access platform to receive real-time notifications of the following events:

  • Session start

  • Session end

  • Customer join

  • Device add

  • Device online

  • Device offline

  • Device delete

  • File transfer

  • Schedule session

  • Bulk deployment

    Enable as many webhook events as you like. When an event occurs, the notification will be delivered in JSON format via POST to the destination URL.

Here’s an example of notification (for the “session start” event):

{
   payload: {
      creatorEmail: "david@zylker.com",
      deviceOs: "Windows 10 Pro",
      description: "On Demand Remote Access Session",
      sessionId: 937974381,
      deviceOsVersion: 6.3,
      devicePlatform: "Windows",
      title: "On Demand Remote Access 937974381",
      department: "My Department",
      deviceName: "Dell"
   },
   eventBy: "malcolm@zohocorp.com",
   eventTime: "1658224413276",
   eventType: "SESSION_START_URS",
   orgId: "703709164"
}

 How do I set up Webhooks for the Zoho Assist activity?

To establish webhook notifications for Zoho Assist, use Zoho Flow or any other third-party service to create a callback URL. Whenever you connect to a third-party system, the incoming webhook will be processed as a message.

Here’s how to create a webhook in Zoho Assist: 

  1. Log in to Zoho Assist

  2. Go to Settings > Integrations > Webhooks

  3. Select Add Webhook.

  4. Add a name, description, and Callback URL.

  5. To test the callback URL, click Ping URL.

  6. From Select Event(s), choose the Module, Event Name, and Department from the drop-down menu.

  7. Click Ping Event to test the selected event and trigger a test run.