How to set a trigger with a OR condition in filter

Post your questions and help other users.

Moderator: Martin

Post Reply
bobeurone
Posts: 18
Joined: 15 Jul 2020 15:09

How to set a trigger with a OR condition in filter

Post by bobeurone » 20 Jul 2020 09:05

Hello

I would like to set a trigger to handle either WhatsApp voice/video calls.
I would like to set a text filter like Incoming voice call OR Incoming video call.

How do I express this? I would like to avoid defining two flows.

Doable?

Bob

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: How to set a trigger with a OR condition in filter

Post by Desmanto » 20 Jul 2020 11:04

I just realize if I google "automagic multiple triggers", my post is the first answer : viewtopic.php?t=6857#:~:text=You%20can% ... %20trigger.

At the trigger elements, tap the 5 line icon on the top, choose new. After adding multiple trigger, you can then split the trigger using multiple parallel expression, example as seen at my Automagic Backup flow : viewtopic.php?f=3&t=7858

You don't have to check {trigger}, you can also check the {notification_text}. Example condition :

Code: Select all

contains(notification_text, "Incoming voice call")
Let say you want voice call to auto answer, so this continue to Perform Action on Notification on Statusbar : Click button - Answer.

While if you want to auto reject video call

Code: Select all

contains(notification_text, "Incoming video call")
This continue to Click button - Decline.

Of course, in your usage, you want both to auto answer, so no need to split here.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

bobeurone
Posts: 18
Joined: 15 Jul 2020 15:09

Re: How to set a trigger with a OR condition in filter

Post by bobeurone » 20 Jul 2020 15:00

I selected two triggers and filtered each on desired incoming notification

Post Reply