Page 1 of 1

cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 19 Dec 2019 23:26
by joego
ive created a automagic to block notifications from a particular twitter account that donot contain the word “bet” but its not working, any idea what ive done wrong? https://dl3.pushbulletusercontent.com/W ... 163831.xml

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 20 Dec 2019 02:49
by jassing
You don't have a trigger specified...
This is utterly untested but should get you going in the right direction... (I don't have Twitter, so you need to fill in that field)

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 28 Dec 2019 19:12
by joego
Is this the right expression to use if you only want to keep notifications that have the word "bet"?

contains(notification_text, "bet")

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 28 Dec 2019 20:23
by Desmanto
@joego : yes. That expression will evaluted to 'true' if the notif text contain "bet" inside. Then use the true branch to go to your main branch of flow.

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 29 Dec 2019 11:40
by joego
For some reason jassons script with that expression is not working, as you can see here it's not removing notifications that don't contain the word "bet" - any idea what changes I should make? https://i.imgur.com/6qNBvKP.png

download/file.php?id=1807

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 29 Dec 2019 22:17
by jassing

Code: Select all

contains(notification_text, "bet")
This matches bet, better, nobet... It ignores "words"
You need to either NOT/! or use the false branch.

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 31 Dec 2019 19:30
by joego
Thanks, Would this be how i'd write the expression:

Code: Select all

contains NOT/!(notification_text, "bet")

Re: cant get this filter to work, which removes notifications that DON’T contain certain keywords

Posted: 31 Dec 2019 21:01
by jassing
You would use either
The true branch of an expression

Code: Select all

NOT contain(notification_text, "bet")

Code: Select all

!contains(notification_text, "bet")
Or

Code: Select all

contains(notification_text, "bet") == false
Or the false branch of

Code: Select all

contain(notification_text, "bet")
A these match notification_text if the string 'bet' is not found. This doesn't care about words.