Trigger event when a specific email comes in

So the USPS informed delivery site will now email you when you have mail that's been delivered. I'm trying to find a way in my hubitat to trigger something when a specific email comes in- this one would be the email that says the mail was delivered today.

If you use an Apple device to receive the emails on. Then this is easy to achieve using the built in shortcuts app and maker api. :+1:t3:

And how would I do that? I’ve been looking in shortcuts and all it will do is open mail and search for a specific subject, it won’t do anything with that information though.

First thing you will need to do is install maker API
then create a virtual device in hubitat (label it something like USPS PACKAGE DELIVERED). Probably a virtual switch.
link this device in maker API
obtain the “external” url address for this device to switch on then head over to Shortcuts
Add an automation (bottom middle tab) when email is received with said subject or body, (to add the do section, click NEW BLANK AUTOMATION) DO- get contents of URL and input the maker API URL for your virtual switch to turn on.

In your virtual switch settings enable ‘auto off 1s’ this way you can use it like a trigger.

Then. Whenever you receive an email matching your requirements you virtual switch “USPS PACKAGED DELIVERED” in hubitat will turn on briefly.
Use this new virtual device in rule machine as your trigger. When USPS package delivered turns ON… etc.

1 Like




1 Like

I have updated the instructions above.
Hope this helps. :+1:t3:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.