Shopify Collection Webhooks Not Functioning Properly

I set up webhooks in my Shopify store to monitor collection changes using the events collections/create, collections/update, and collections/delete. However, I’m running into some weird issues that are driving me crazy.

The creation webhook fires when I add a new collection, but the payload comes back completely empty. There’s no collection data or ID anywhere in the response. Here’s what I’m getting:

{
    "x-shopify-topic": "collections/create",
    "x-shopify-shop-domain": "teststore.myshopify.com",
    "x-shopify-hmac-sha256": "AbCdEf****************yZwXvQ=",
    "x-real-ip": "204.93.213.120",
    "x-forwarded-for": "204.93.213.120",
    "user-agent": "Ruby",
    "host": "requestbin.com",
    "content-type": "application/xml",
    "content-length": "474",
    "connection": "close",
    "accept": "*/*",
    "x-heroku-queue-wait-time": "0",
    "x-heroku-queue-depth": "0",
    "x-heroku-dynos-in-use": "1",
    "x-request-start": "1343050015180"
}

Even worse, the update and delete webhooks never trigger at all when I modify or remove collections. Has anyone else experienced this problem with Shopify’s webhook system?

I’ve experienced the same issue, and it can indeed be quite frustrating. The empty payload you’re encountering with Shopify’s collection webhooks is unfortunately not uncommon, particularly with custom collections. Only the headers seem to come through without any related body content, indicating a potential bug in Shopify’s system.

As for the update and delete webhooks not triggering, this appears to be a recurring problem. Many developers have observed that these webhooks fail to activate consistently when collections are modified or removed. I’ve opted to use a different approach by polling the Collections API periodically, which, although not ideal, has proven to be a more reliable method for tracking changes in collections. Alternatively, you might consider leveraging the GraphQL Admin API with a scheduled task to retrieve and compare timestamps.

This exact scenario bit me hard when setting up my store automation last year. The empty payload happens because Shopify’s collection webhooks have a known limitation - they don’t always include the actual collection data, especially for newly created collections. Here’s what worked for me: when the webhook fires, I immediately make a follow-up API call to fetch the collection details using the timestamp from the headers to identify which collection was just created. For the missing update and delete webhooks, certain collection modifications don’t trigger webhooks at all - particularly bulk operations or changes made through third-party apps. I’ve had to set up a backup polling mechanism every few minutes to catch these missed events.

yeah, shopify webhooks r really unreliable. I switched to the admin api events after dealing with similar issues - way more consistent. Also check if ur endpoint’s handling the xml payload right, since shopify sends collection data as xml, not json.