By David Litvak, on Apr 12, 2016

Schedule your post and go for lunch

Illustration orange app illustrations

Update: Scheduled publishing is now a built-in feature in the Contentful web app. Please see this post for more details on the release.

A lot of users told us that they really miss scheduled publishing – a way to exactly specify when a certain content piece should go live. (Comes handy when you want to publish exactly at lunchtime but don't want to give up on your time with friends.)

We've built it. It's based on the recently released new and improved webhooks which help crafting custom extensions and integrations by responding to content-related events. Scheduled publishing it just one of the many things that everyone can build.

Scheduled publishing is handled by the contentful-scheduler Ruby gem. To set everything up you'll need some knowledge of Ruby and a bit of free time.

The workflow goes like this: you'll add a field to your content type, calling it something like publication_date, so that you'll be able to set a specific date for every entry. Then you'll set up a contentful-scheduler-based webhook listener server which will be listening to the webhooks coming from Contentful, and will recognize every update of the publication_date field. (The config of this gem will also contain the credentials of your space.) Finally, you'll set up a webhook which will be pointing to this very server.

The contentful-scheduler repo contains the code and the detailed setup instructions. Get it, try it, enjoy it and schedule some posts with it.

Have fun with webhooks and build something new yourself! Shortly we'll be writing about other interesting new things which anyone can create.

David Litvak

David is a Ruby and Python evangelist, agile devotee, frustrated sports legend, and solution delivery manager at Contentful. He spends most of his days either coding or slaying orcs and beasts in his favorite role playing games. You can follow him on Twitter or on Github.