How to avoid webhooks routine an infinite loop in make.com

Hello, i have webhooks routine in make.com that is triggered on item status changed. But routine itself makes infinite loop because purpose of routine is to change item status.

That is the best way to avoid this?

I made up solution to have extra “routine state” column in item but i don’t like this solution.

One solution I’ve used, is if the user whose token is used for make.com is a dedicated account for automations and not one used for regular operations you can filter incoming webhooks for that user id and ignore them.

You could also use a data store module to store a value with a key that is a hash of item_id, user_id (the token user), column_id, previous_column_value (the value before your first change), and column_value (value after) along with a timestamp. Then when receiving events you get that same data in the webhook and can retrieve the record based on that, check the timestamp (that its recent and not 4 hours ago) and then delete the record and stop processing (if there is no record, or its old, you’d proceed with processing)

You’d also need a scenario that gets any records and checks for old ones, at the end of the day or such, to prevent your data store from filling up.

Thats the general gist of it, the exact implementation is up to you. But basically you don’t stop retriggering but you do stop making further changes which prevents an infinite loop.