Webhooks
If you need to automate tasks or trigger external processes when your content is updated, you can leverage the webhooks feature. When content is pushed or modified to a specific branch, TinaCMS sends a notification to your server. The payload includes the paths of the modified files, enabling event driven actions like rebuilding your site or populating a search index.
Setting Up
Webhooks can be created via the "Webhooks" tab within a project.
To create a webhook, follow these steps:
- Go to the project.
- Click Webhooks | Add Webhook
- Enter a name, server URL, target branches and additional headers to be sent to the your server.
Webhook Logs
Webhook logs can be found within Webhooks | Logs.
Each log entry includes:
- Date: Timestamp of the webhook request.
- Status: HTTP status code returned.
- Request: Payload sent (see Requests)
- Response: Body returned from your server.
Requests
Below is an example webhook request payload:
The payload
typecan be of either['content.modified' | 'content.removed' | 'content.added']