"Set Schedule" webhook

Hi,
is there any way to detect when Entry or Asset is set to schedule and run a webhook on that?

Hi @nmdev072020 ,

No, at the moment the Scheduled publishing/unpublishing is not something that is visible in the Webhooks. However we have an endpoint on CMA that can give you this information:
https://www.contentful.com/developers/docs/references/content-management-api/#/reference/scheduled-actions/scheduled-actions-collection/get-all-scheduled-actions-of-an-entry/console/curl

You could create a simple cronjob on your end that checks every X minutes which entries are scheduled for publishing, and achieve practically the same result as the one you would with Webhooks.

Hi @Alma,
is there an API to get all scheduled actions (like these buttons https://www.contentful.com/help/viewing-scheduled-actions/)?
I’m mean not only a single but all entries, which are marked as scheduled.

Could you try:
https://api.contentful.com/spaces/{space_id}/scheduled_actions?environment.sys.id={env_id}&sys.status[in]=<scheduled|canceled…>

1 Like