I want to create a flow that sets a global variable to 1 as soon as a WhatsApp message arrives. To 0 as soon as this message is gone. My first attempts only worked sporadically.
The variable should then become 1 as soon as the message arrives
instead of flow you can try use
fl(ni(count),0,i-1,"ni(i,package)",#)~=whatsapp on global text.
If you use $gv(noti)=1$ will return 1 if noti is already 1 0 otherwise is this what you want? I think you might instead do this:
- keep your trigger
- in the formula just write “1” your global will be set to one
- add a delay action of 60 seconda
- add another formula with 0 and another set global action
This way “noti” will go to 1 when notification arrives and back to 0 after 60 seconds
Thx that helps for my Project