PATCH call in Entry.publish webhook sets entry state to "changed"

Hello!

We are writing a backend app for the Marketplace and have an infinite loop problem:

Our backend app, which is (subscribed to the Entry.publish event), makes a CMA PATCH request very similar to this one, saving some data into a single field in the entry.

The PATCH CMA JS code is heavily based on the fetch code from the contentful/apps example here.

During the PATCH request the field is updated OK, but the entry status (visible in the Sidebar) moves from “published” to “changed” when the field is updated.

I have tried making a second PUT request in our backend app to the /published endpoint, but this causes an infinite loop.

Is there a recommended way for a backend app/webhook to listen to the Entry.publish event and make changes to a field without setting the published state of the entry to “changed”?

1 Like