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?

1 Like

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.

1 Like

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

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.