Starting flow when app has a specific message?

Post your questions and help other users.

Moderator: Martin

Post Reply
magik20
Posts: 10
Joined: 03 Apr 2014 15:26

Starting flow when app has a specific message?

Post by magik20 » 03 Apr 2014 15:34

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Starting flow when app has a specific message?

Post by Martin » 04 Apr 2014 10:20

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

Ra9om1ak
Posts: 32
Joined: 06 May 2013 14:26

Re: Starting flow when app has a specific message?

Post by Ra9om1ak » 07 Apr 2014 12:48

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Starting flow when app has a specific message?

Post by Martin » 10 Apr 2014 09:07

The notification icons color can not be changed unfortunately (not even the built-in icons of Automagic).

Post Reply