Skip to main content

Incoming webhooks

Some APIs allow you to get instant notifications whenever an action is performed on the remote platform. When an API implements the notifications (or events), the system notifies you of the event by sending a request to an URL. So, you can enable notifications based on a specific operation like create or update. That means when a record is created or updated in the remote platform, the event is triggered and automatically a request is send to the defined URL, for example to Cenit IO, where the record can be created or updated.

In order to achieve the goal of creating or updating a record in Cenit IO anytime the record is created or updated in the remote platform, two conditions must be accomplished:

  • The remote platform allows to define notifications, events or any other mecanism, no matter its name is, that let you configure the process which sends a request to an URL defined by the user anytime a record is created or updated in the remote platform.

  • You must define the resources in Cenit IO in order to accept requests from the remote platform to receive the information about the new record created or updated there.

The activation of the events in the remote platform may vary from one API to another. For example, in the case of the Slack API you can enable and configure the events via web in the same view where you handle the app which access to the API.

image

However, in the case of the Zoho CRM API you need to send a request for configuring the notifications (events) via API.

image

On the other hand, the process differs from one API to another. For example, in the case of the Slack API, when an event is triggered, the request sent to Cenit IO contains the entire record that was created or updated in the remote platform, so it can be stored in Cenit IO directly.

Slack event support

However, in the case of the Zoho CRM API, when a notification (event) is triggered, the request sent to Cenit IO contains only the id of the record that was created or updated in the remote platform, so Cenit IO needs to use that id to request the entire record in a new petition and recover it from the response.

Zoho CRM notification support

The set of resources for implementing this process in Cenit IO is called incoming webhook and it's described in the next section understanding_the_incoming_webhooks_elements