Is it possible to trigger a flow when accessing a URL?

Post your questions and help other users.

Moderator: Martin

Post Reply
kenvega
Posts: 12
Joined: 19 Nov 2019 17:57

Is it possible to trigger a flow when accessing a URL?

Post by kenvega » 08 Sep 2020 00:51

one thing I haven't found clearly is how to trigger a flow when accessing a URL

use case: don't allow me to enter facebook.com if I'm on working hours

I've seen this is possible for some apps like this one: https://play.google.com/store/apps/deta ... lock&hl=en

So I wanted to check if it is possible through Automagic as well

The nearest related trigger I have found is this one https://automagic4android.com/trigger_v ... ed_en.html but I don't think it does what I need

If it is possible, can I get access to the complete URL? so I can do more logic based on the url

icefox56
Posts: 53
Joined: 15 Aug 2017 02:56

Re: Is it possible to trigger a flow when accessing a URL?

Post by icefox56 » 12 Sep 2020 03:44

Trigger: UI Event
Event type: text changed
Package: select the browser you use from the list
Contains text: facebook.com

Action: Control UI

Code: Select all

text=getTextInActiveWindow()
Condition: Expression

Code: Select all

contains(text, "facebook.com")
The above flow will recognize whenever you type facebook.com or that text is displayed on the browser screen.

Next optionally you can use,

Action: Control UI

Code: Select all

home()
To return to the home screen when ever you type facebook.com on the browser.
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted

Post Reply