How can i create a flow to change a global variable

Hey:)
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

Screenshot 2023-10-30 160926

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

1 Like

Thx that helps for my Project :slight_smile:

1 Like

This topic was automatically closed 25 days after the last reply. New replies are no longer allowed.