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.
Webhooks can be created via the "Webhooks" tab within a project.
To create a webhook, follow these steps:
Webhook logs can be found within Webhooks | Logs.
Each log entry includes:
Below is an example webhook request payload:
{clientId: "276...",branch: "main",paths: ["content/authors/bob", ...],type: "content.modified",eventId: "472..."}
Note: The payloadtype
can be of either['content.modified' | 'content.removed' | 'content.added']