Skip to content

Storyblok

Storyblok

Storyblok is a headless CMS that allows you to manage your content in a visual way. It is a great tool to use with Headless Comments.

This guide assumes you have a Storyblok account and a Headless Comments account.

Webhooks

Headless Comments supports Storyblok webhooks to automatically manage pages and comments.

To get started, head to /pages in your Headless Comments dashboard and click on the “Add pages” dropdown, then select “Storyblok webhook”.

Here, you’ll be presented with a form with the following fields:

Directories
The directories Headless Comments will create new pages for when a new Storyblok entry is created. You can have multiple directories separated by commas. i.e blog,news,articles

Allow Comments
Allow comments on the pages created by the webhook.

Enabled
Enable or disable the webhook.

Once you’ve filled out the form, click “Create Webhook”. A webhook URL will be generated for you to use in Storyblok.

Storyblok Setup

Head to your Storyblok space and navigate to the settings page. Click on the “Webhooks” tab and click “Add Webhook”.

Fill out the form with the following details:

Name
A name for the webhook.

Endpoint URL
The webhook URL generated by Headless Comments.

Triggers
Select the events you want to trigger the webhook from the Story tab. Headless Comments supports “story published”, “story unpublished” and “story deleted”

Once you’ve filled out the form, click “Save”.

Now, whenever you publish, unpublish or delete a Storyblok entry, Headless Comments will automatically manage the corresponding page and comments.

FAQ

Can I use Storyblok with Headless Comments without webhooks?

Yes, you can manually create pages in Headless Comments or use the API to create pages.

What happens if I unpublish a page in Storyblok?

If you unpublish a Storyblok entry, the corresponding page in Headless Comments will stop accepting comments.

What happens if I delete a page in Storyblok?

If you delete a Storyblok entry, the corresponding page in Headless Comments will be deleted.

What happens if I delete a page in Headless Comments?

If you delete a page in Headless Comments, the corresponding Storyblok entry will not be deleted. You will need to manually delete the entry in Storyblok.