How to create counter

I want solution
When webhook is triggered first time then counter should be 1, second time counter should 2 , their time counter should be 3 then 4th time should be 4 then reset and repeat the counter so that if counter = 1 then I will do something else,
if counter is 2 then I will do other process in similar way it should reset after 4 and restart with 1 again how can this can be done any suggestion or help please

Hi @chandan988, you would need to store the counter value somewhere (for example a database or static workflow data). When your workflow runs, it could then read the old value and add 1 to it, then apply your conditions using IF or Switch nodes. Depending on the value you can then save the new result or reset the counter back to 1 as you have described.