Listening to updates using webhooks
Last updated
Last updated
A great way of building data-driven apps using Felt is by triggering a workflow whenever something changes on a map, like someone drawing a polygon around an area of interest or updating the details on a pin.
Instead of polling by listing elements, comments or data layers on a fixed interval, a better alternative is to set up a webhook where Felt will send a notification any time a map is updated. This allows you to build integrations on top, such as sending a Slack message or performing calculations for the newly-drawn area.
Two things are needed in order to make use of webhooks:
A Felt map which will serve as the basis for the webhook. Updates will be sent whenever something on this map changes.
A webhook URL where the updates will be sent in the form of POST
requests.
Workspace admins can set up webhooks in the Webhooks tab of their workspace.
Simply click on Generate new webhook
, select a map to listen to changes and paste in a webhook URL where the updates will be sent to.
In order to use webhooks effectively, a receiving layer must be set up to trigger actions based on the updates sent by the Felt API. Here are some examples of how to set up a webhook using Felt and an external service.