Gatsby Cloud Invalid event type update

Hello,

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