What are Webhooks?
Webhooks are one way that apps can send automated messages or information to other apps. Whenever something specific happens in an application, a resulting message can be sent to notify a 3rd party that might be interested.
For the Tiled application, the "completion events" system allows builders to configure a "webhook URL" value for each microapp. Each time the microapp encounters a completion event Tiled will automatically hit the URL that was entered for the "webhook URL". In addition to configuring the webhook URL, an endpoint associated with that URL needs to be set up to support in the incoming webhook requests. This endpoint needs to accept these messages and information to act accordingly and take any number of different actions that should result from the completion event.
Some example use cases:
- Send a notification via slack, email, etc
- Update an internal database
- Fire off custom analytics or tracking events
What to expect from the incoming webhooks sent out by Tiled
For anyone curious about what kind of data will be sent out by Tiled's webhook system, here is an example of the payload to expect on your end when building an endpoint to handle incoming webhook requests.
Example webhook payload:
{ "userId": "example@recipient.com", "microappId": "5ca668834b320d1f53dc7bab", "microappName": "Test microapp", "completionName": "cmptscreen5cca158fa969a00eee04ba12"; }
Create a webhook for your project at https://webhook.site/