# Email - Trigger flows based on incoming emails

**URL:** <https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337>\
**Category:** Apps\
**Created:** [February 20, 2021, 8:02am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337 "2021-02-20T08:02:11Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 10, 2025, 12:39am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/85 "2025-01-10T00:39:27Z")

</div>

> [@Kam](#):
>
> How do I execute the PHP-script

You’ll need to run a local webserver

For Windows, this is a way to run php:  
[https://www.geeksforgeeks.org/how-to-install-php-in-windows-10/](https://www.geeksforgeeks.org/how-to-install-php-in-windows-10/)

_XAMPP_ server is a complete server package.  
This should install quite straightforward:  
[https://www.geeksforgeeks.org/how-to-install-xampp-on-windows/](https://www.geeksforgeeks.org/how-to-install-xampp-on-windows/)

More:  
[https://www.geeksforgeeks.org/how-to-run-php-programs/](https://www.geeksforgeeks.org/how-to-run-php-programs/)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 10, 2025, 1:24am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/86 "2025-01-10T01:24:34Z")

</div>

The v1.0.2 app still works flawless on Homey Pro 2019,  
I use Strato imap servers.

Are you using Pro 2023?

> ![1000000381](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/f/6f21b105c34c6ad8476d1eae02d674d813da00b2.png)

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 10, 2025, 5:18am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/87 "2025-01-10T05:18:51Z")

</div>

Thank you for your help here, Peter!  
Is this usable for your case, Kam?

If not, please let me know whag exactly triggers the mail to be send.

---

<div class="post-metadata">

**Author:** ![Stefan\_Beck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stefan_beck/32/80078_2.png) [@Stefan\_Beck](https://community.homey.app/u/Stefan_Beck)\
**Post date:** [January 10, 2025, 9:15am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/88 "2025-01-10T09:15:20Z")

</div>

Hello everyone, does the app work for homey 2023 for anyone? Has anyone contacted the developer or received an answer?

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 10, 2025, 6:11pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/89 "2025-01-10T18:11:07Z")

</div>

Hey Stefan,

nope, the app does not work on Homey 2023.  
Unfortunately Adam Noren has not responded to anyone, including me, trying to reach him - this is why wrote this: [Email - Trigger flows based on incoming emails - #65 by lukenukemmp3](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/65)

I use webhooks for nearly all purposes now, called by a PHP-script. Is this helpful for your usecase? Please describe your usecase, if not. Maybe we can figure out, how to make this work!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 10, 2025, 6:11pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/90 "2025-01-10T18:11:46Z")

</div>

Hi Adam @norenz Sorry to tag you like this.  
Can you please say anything about errors with the Email app on the Pro 2023?  
Anything we can do to help out?

Thank you.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 11, 2025, 8:42pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/91 "2025-01-11T20:42:14Z")

</div>

Thanks for your continued support in my quest. I don’t own a local webserver. Can I run the PHPMailer in Gmail as an alternative?

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 11, 2025, 8:57pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/92 "2025-01-11T20:57:56Z")

</div>

As for what exactly triggers the e-mail, here’s the following rule I have in [Outlook.com](http://Outlook.com) — “if the from address is “"info@\*\*\*\*\*\*\*.com” AND subject line includes “New Request”, then forward to my Gmail.

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 11, 2025, 11:34pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/93 "2025-01-11T23:34:03Z")

</div>

Do I understand correctly that there is a form on a website that sends the mail to you?  
If so, can you additionally (or instead) let the form execute the PHP-script?

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 11, 2025, 11:47pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/94 "2025-01-11T23:47:53Z")

</div>

There’s no form on my end. I have no idea what my job uses to e-mail me stating there’s a new request available.

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 12, 2025, 12:17am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/95 "2025-01-12T00:17:19Z")

</div>

Okay, since you receive the mails in GMail - if I am on the right track here - you could use Google Apps Script for sending the webhook in dependency of the subject of the incoming mail.

But all of this needs a little bit of coding.  
I will test something with my GMail Acc but this will need a few days.

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 12, 2025, 9:05am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/96 "2025-01-12T09:05:18Z")

</div>

Unfortunately GMail Apps Script does not support a trigger for incoming mail.  
That given it would only be possible to call this script on a schedule.

So how about the IFTTT-Trigger for incoming mails? You can try it yourself and measure the latency.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 12, 2025, 8:00pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/97 "2025-01-12T20:00:25Z")

</div>

Would this be available if I use my Outlook instead of Gmail?

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 12, 2025, 9:19pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/98 "2025-01-12T21:19:37Z")

</div>

Another post, another unfortunately:  
Unfortunately I am no member of the microsoft support. The only thing I can do here, is use Google. Which leads me to this:

> **[Trigger Webhook when an email is received - Microsoft Q&A](https://learn.microsoft.com/en-us/answers/questions/1373454/trigger-webhook-when-an-email-is-received)**
>
> I am wondering if I can trigger a webhook whenever an email is received to a shared mailbox. I see there is webhooks which send a change notification whenever an email is received so I think it is possible but I am not figuring out where to do…

I am sorry, that I can’t help you any further.  
What you try to achieve is to send a webhook with a certain tag, which can be used to trigger a flow in Homey.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 12, 2025, 9:36pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/99 "2025-01-12T21:36:23Z")

</div>

Understood 😄  
What abut trying the PHPMailer in Gmail? Would that be a viable option?

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [January 13, 2025, 6:29am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/100 "2025-01-13T06:29:27Z")

</div>

A PHPMailer is used to send mails, not to receive them - so I don’t know how to use this.

Like I said before: test IFTTT for latency.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 15, 2025, 3:59am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/101 "2025-01-15T03:59:33Z")

</div>

I will test IFTT and reply as soon as possible.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [January 30, 2025, 11:04pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/102 "2025-01-30T23:04:27Z")

</div>

Could you please give me a quick rundown on how to test IFTT Gmail latency? In my IFTT, the Gmail states no services available. I’m attempting some additional assistance from AI, but I don’t have a Workspace Gmail.

---

<div class="post-metadata">

**Author:** ![lukenukemmp3](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukenukemmp3/32/91808_2.png) [@lukenukemmp3](https://community.homey.app/u/lukenukemmp3)\
**Post date:** [February 2, 2025, 9:04am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/103 "2025-02-02T09:04:55Z")

</div>

Hey Kam,  
you could use a mail send from homey ([Email sender App für Homey | Homey](https://homey.app/de-de/app/email.sender/Email-sender/)) to your google-mail and start a stopwatch ([Chronograph App für Homey | Homey](https://homey.app/de-de/app/nl.fellownet.chronograph/Chronograph/)) when doing so.  
Then you can use the IFTTT-Trigger ([IFTTT App für Homey | Homey](https://homey.app/de-de/app/com.ifttt/IFTTT/)) to send you push notification with the actual time of the stopwatch and stop it.

---

<div class="post-metadata">

**Author:** ![Kam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kam/32/121058_2.png) [@Kam](https://community.homey.app/u/Kam)\
**Post date:** [February 3, 2025, 5:11am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/104 "2025-02-03T05:11:56Z")

</div>

Thanks everyone, for your assistance up to this point, but I decided to skip IFTT for now. With the help of AI, I set up a flow with a webhook and the use of Google Apps script. I would like to evaluate this method’s reliability before attempting IFTT.

[Previous page](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337.md?page=4)

[Next page](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337.md?page=6)
