Gatsby Cloud Invalid event type update


I’m trying to set up Gatsby Cloud Previews via the preview webhook. Publishing works without problems and it updates both the preview and production builds. But when I hit “save” for my post inside Dato, it triggers the preview build inside Gatsby Cloud but it says “invalid event type update”. It doesn’t seem to work for updates for some reason. Any tips on how to fix this so that I can preview saves without having to publish? Do I need to modify the http body payload for previews?

I tried it with a brand new Gatsby Cloud Dato CMS site blog starter template and let it do the entire configuration. It’s still happening. Publishes and updates work for the build webhook, but updates don’t work for the preview webhook. Any advice here would be highly appreciated @matjack1 or @stefano.verna

Hi @aroy002, message received, we’ll take a look at this as soon as we can!

hey @aroy002 make sure you have a custom payload like this:

  "message": "{{event_type}} event triggered on {{entity_type}}!",
  "entity_id": "{{#entity}}{{id}}{{/entity}}",
  "entity_type": "{{entity_type}}",
  "event_type": "{{event_type}}"

Let me know if that solves your problem?

That did the trick! It still gives a warning about the update type but it works! Is this documented somewhere?

Thank you!

not yet, my bad, we need to add a page for this, we’ll do that!

1 Like