Hello everyone,
Is it possible to select which operations will trigger a webhook?
Is it possible to make a write request through Write API without triggering a webhook?
Our goal is to have a webhook that fills in some metadata in one model, this model will be updated often which will trigger the webhook without need. So if the webhook would only be triggered on page creation and not on updates e.g., or if we could send some parameter on the write request to not trigger the webhook, it would be great.
Or if you have any other solution, please feel free to suggest.
Thanks!
Hello @ruimartins,
Welcome to the Builder.io forum post.
Currently, Builder.io will POST
to the endpoint you provide every time content is published, unpublished, archived, or deleted. While there is no direct control over this behavior on the Builder side, you can implement a server-side script to accept and discard Builder’s POST
requests as needed.
It’s essential to note that the POST
requests using the write API currently do not trigger webhooks. However, we’ve received feature requests to support this, and we think it could be a great addition. If you have a moment, we encourage you to submit your request at Builder.io Ideas.
Thanks @manish-sharma for your answer.
Currently we are making PATCH
requests with the write API and this seems to trigger the webhook. You mean that ONLY POST
requests using write api do not trigger the webhook?
Hello @ruimartins,
POST Request wasn’t triggering the webhook. Is that the case with you as well?
Never tried with POST
because my goal was just to update some fields on the model, not replace the entire model. With POST
we need to replace the entire model, right?
I read the docs, POST
creates a new entry in the model, is not what we need.
We must work with PATCH
which triggers the webhook again.
POST
also triggers the webhook, just tested.
Hello @ruimartins,
When using Write API POST request is triggering the webhook which was something not working recently, I believe we must have deployed a fix.
For your other requirement with webhook, I would recommend submitting the feature request at Builder.io Ideas.