Page 1 of 1

Starting flow when app has a specific message?

Posted: 03 Apr 2014 15:34
by magik20
Hello, im a new user to Automagic with zero programming skills, so bare with me.

My goal is when a specific app sends a notification to my phone (text = "x") that it then triggers actions.

So far I think I have the actions down, but im getting lost on how to create this specific condition.

Re: Starting flow when app has a specific message?

Posted: 04 Apr 2014 10:20
by Martin
Hi,

The trigger Notification on Statusbar Displayed supplies the following variables to a flow: title, notification_text, notification_text_big. The variables are listed in the help page of the trigger ([?]-icon on the right side of the trigger type when editing a trigger).
The title-variable should be available on all devices (content depends on the app posting the notification), the other two notification-variables are not available on all devices/notifications (also depends on app).
An expression to check whether variable title contains the text x could look like this:
-trigger Notification on Statusbar Displayed: <desired app>
-condition Expression: contains(title, "x")
-->true: -action Vibrate

I recommend to use a condition Debug Dialog first instead of the condition Expression to show a popup dialog with all variables and values when the flow is executed (check Ignore ongoing events in the trigger to ignore some notifications like file downloads and 'keyboard opened'-notifications). You could also add an action Notification on Screen: {title} or Notification on Screen: {notification_text} to show the content of the variables when the flow is executed.

Regards,
Martin

Re: Starting flow when app has a specific message?

Posted: 07 Apr 2014 12:48
by Ra9om1ak
Is it possible to change the color of the icon after the notification containing the Expression: contains (title, 'A')?
Example: whatsapp mesage from "A", the icon turns red.
Thx.

Re: Starting flow when app has a specific message?

Posted: 10 Apr 2014 09:07
by Martin
The notification icons color can not be changed unfortunately (not even the built-in icons of Automagic).