Contentful logo

Contentful Community

Webhook filters not set

Hi, I’m trying to create a webhook with a filter, but the filter part is not persisted in Contentful, everything else (name, url, topics) is OK.

I’m using the JS version of contentful-mangement library (version 5.3.1). Here is the webhook I’m trying to create:

{
“name”: “my-webhook”,
“url”: “https://my-webhook-receiver.com/ping”,
“topics”: [
“Entry.publish”,
“Entry.unpublish”
],
“filters”: [
{“in”: [{“doc”: “sys.id”}, [“main_nav”, “footer_nav”]]},
{“regexp”: [{“doc”: “sys.environment.sys.id”}, {“pattern”: “^test-.+$”}]}
]
}

What am I doing wrong?

Hi there,

I’ve just successfully created a webhook with filters using contentful-management.js.

Could you please share your code?

Best regards,
Jakub

My mistake, I was not including the filters information when calling contentful-management.

Now it works well.

How can I do an in filter in contentful Webhook using the web app?

For example ContentType in ["learnArticlePage","magazineArticlePageV2"]