Determining which documents have changed with webhooks

I'm planning to use the webhook feature for sending notifications on new article release for users. I could not find the way to grab the published content's ID. Any pointers?

2 Likes

I think I figured it out. The Webhooks do not specify what has changed, just that something has changed.

After you receive a webhook you can query your documents by publication date (first_publication_date and last_publication_date ) and use the date.after predicate to get documents that have been published or changed since the previous time you received a webhook. With GraphQL you can use firstPublicationDate_after and lastPublicationDate_after arguments to query after a given date and time.

2 Likes

Thank you! Hope Prismic will add it on the webhook.

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.

Just an update for everyone, we are currently working on this feature and will update you with the progress of this feature here :slight_smile:

2 Likes