Page 1 of 1

Successive SMS received trigger

Posted: 04 Sep 2019 13:34
by Gen
Hi,

I'm trying to create a trigger that will execute a flow only when my phone receives 3 SMS messages within 5 seconds.

At the moment I have a trigger of SMS received followed by a script action which increments a global variable by 1 and a separate branch that sleeps for 5 seconds and resets the variable to 0. I have an expression branching from the script action which checks if the variable equals to 3 and then performs my flow actions.

I don't think this is ideal because the flow seems to wait for 5 seconds before executing the rest of the flow even if my phone receives 3 SMS messages within the first second.

Could someone please advise on a better way to achieve this? I basically just need the flow to execute only if I receive x amount of SMS messages within y amount of seconds.

Thanks!
Gen.

Re: Successive SMS received trigger

Posted: 05 Sep 2019 01:41
by Desmanto
Use condition execution count, 3 times, tick timed, use 5s. True, go to your main branch of the flow. False, do nothing

This execution count will act as buffer to protect your main flow. It will only continue after it has been executed 3 times within 5 seconds. It reset after the time (5s), so the count reset to 0.

Re: Successive SMS received trigger

Posted: 05 Sep 2019 07:03
by Gen
Perfect, thanks!

Didn't know there was such a condition :)