Mail Hook - Trigger Flows when new emails arrive via IMAP
This app triggers Homey Flows when new emails arrive in a configured IMAP inbox. It’s perfect for integrating incoming email events with smart home automations, such as notifying you when a specific sender messages you, running actions when a delivery notice arrives, or automating responses to important emails.
Triggers
A new email is received
Triggers when a new email arrives in the configured IMAP inbox. Provides the sender address, subject and body as tokens.
A new email is received on [account]
Same, but only for the account you pick.
Actions (Then)
Mark email as read / unread
Delete email (moves it to Trash)
Move email to a folder
Tap the tag icon in the Email reference field and pick the Email reference token from the trigger.
Move and delete make the reference unusable, so run them last: in an Advanced Flow after the other Mail Hook cards, in a standard Flow with a short delay.
Please use English screenshots in English topics for all the non-Dutch out there.
In case you don’t want to change Homey’s language just to create screenshots,
Google Lens can translate text on images very well. An example, SE to EN:
Hi @Elmar, same problem here not possible to install on Homey 2019, Software Version 13.1.2.
When I go to the app store and select my Homey to install, it says the app will be installed shortly, but nothing happens on my Homey. The app doesn’t install.
The other email app from Adam Noren don’t work anymore on Homey 2019, I use this longtime but don’t work anymore.
That app installs and works fine on my Pro 2019 v13.1.2
So I think the issue is, it depends on the mail provider you use → at least Gmail doesn’t work (anylonger), even when using Googles’ “app passwords”.
Confirmed.
The Mail Hook indeed seems to get installed on my Pro 2019, the blue LED ring even turns for a while, but there’s no app to be found.
Also posted as reply on the github issue;
After using the CLI homey app run command, this seems to quit the installation process on 2019 models: ✖ request to https://192-168-2-107.homey.homeylocal.com/api/manager/devkit/ failed, reason: unable to get local issuer certificate
• Tell them: “Unplug your Homey Pro from the power for at least 11 minutes. Do not just restart it via the app; it must be physically unplugged. This forces the security certificate to reset.”
Step 2: Use the Mobile App (Not a Browser)
If they are trying to click “Install” on a laptop browser, the browser’s security settings are likely blocking the request.
• Tell them: “Try to open the installation link on your phone instead of a computer, and make sure your phone is on the same Wi-Fi as the Homey. The mobile app handles security certificates differently than Chrome or Edge.”
Step 3: Disable “Private DNS” or VPN
If the user has a VPN active on their phone/computer, or a feature like “Private DNS” (common on Android), it will prevent the 192-168-x-x.homeylocal.com address from working.
• Tell them: “Turn off any VPNs or Ad-Blockers (like Pi-hole or AdGuard) temporarily while clicking Install.”
New “Then” cards (thx for the suggestion on GitHub):
Mark email as read / unread
Delete email (moves it to Trash)
Move email to a folder
How to use: the triggers now have an Email reference token. Tap the tag icon in the Email reference field of the Then card and pick that token.
Move and delete make the reference unusable, so run them last. In an Advanced Flow, connect them after the other Mail Hook cards. In a standard Flow, add a short delay.
Fixes:
Body token is now readable text (plain text, or HTML with the tags stripped) instead of raw MIME
Much lower memory use with big emails and attachments
No more duplicate triggers after saving the settings
I have set-up some AVD’s with the Device Capabilities app, to have a Device card for each mailbox. And then I have some simple Python scripts stored on a Raspberry Pi, to fetch mailbox stats… and then some pretty crazy Flows to run the scripts, format the returned value and store it in the appropriate value of the AVD.
I saw your last post, and was wondering if you’d be interested in including something like this in your app?
For example:-
One of my mailbox AVD device cards, the button on the first tab just triggers the update stats Flow, if you want to update in between the intervals:
Please excuse my coding… I am not a developer, my scripts were just written with lots of googling ha ha ha I only include this an an example, so hopefully you are able to understand what I’m suggesting (I really hope my gibberish makes some kinda sense?)
I think this would make an awesome upgrade to your marvellous app… I use it a lot in my Flows
I would very much like to hear what you think?
Thank you kindly good sir for all your hard work on this app, and your consideration of new ideas.