Received iMessages/Calls as triggers

Is it possible to use a received iMessage as trigger.

For instance if you get a notification (image or call) from a certain person (emergency) at night turn on the light.

I thought maybe something like ifttt could put that information from the phone to ha.

This isn’t possible right, @petro ?

You would need something that can monitor iMessages and be triggered by a message from a specific person or by keywords in the received message. As far as I know, even Apple’s own Shortcuts app doesn’t support that.

I don’t know if it would be possible, but you’d be more likely to be able to do this using Messages on a Mac. I vaguely remember trying to do something with Automator and applescript when I was using Indigo.

A quick look shows that it is (or at least, was) possible: https://hackernoon.com/a-crude-imessage-api-efed29598e61

Thanks, you are right this could be a solution, but this would mean the mac has to be always on and that’s not an option for me.

Anyway I don’t NEED this, it’s just an idea I had to be alarmed at night when someone from the family has an emergency.