# 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:** 1

<div class="post-metadata">

**Author:** ![AdvaLa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/advala/32/8666_2.png) [@AdvaLa](https://community.homey.app/u/AdvaLa)\
**Post date:** [February 20, 2021, 8:02am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/1 "2021-02-20T08:02:11Z")

</div>

Adam Norén has written a amazing app that triggers flows based on incomming emails. The problem is, I cannot get it to work. I installed it correctly but am unable to configure it. I keep getting “Invalid Credentials (Failure)” or “Timed out while authenticating with server” messages. I know for a fact my password is correct (cause I log in with it).

I tried with several accounts, using pop or imap servers, using all known ports (25, 2525, 25025, 993, 995), secure on/of, but to no avail. I allowed less secure apps to use my mail, tried a standard gmail, hosted gmail, but alas.  
Obviously I’m doing something wrong, because some other user got it to work, but I just don’t know what.

 ![Attachment0](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/a/caca1597fdf8cc5cc193f0fde8a263aac4eb4a0f.jpeg)

---

<div class="post-metadata">

**Author:** ![Tolga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tolga/32/12563_2.png) [@Tolga](https://community.homey.app/u/Tolga)\
**Post date:** [February 20, 2021, 12:22pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/2 "2021-02-20T12:22:17Z")

</div>

Have same problem with yahoo

---

<div class="post-metadata">

**Author:** ![Tolga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tolga/32/12563_2.png) [@Tolga](https://community.homey.app/u/Tolga)\
**Post date:** [February 20, 2021, 2:02pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/4 "2021-02-20T14:02:04Z")

</div>

@norenz Hi,

I create a diagnost report 220d706c-6df2-497d-a5f9-fc798161a673

---

<div class="post-metadata">

**Author:** ![AdvaLa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/advala/32/8666_2.png) [@AdvaLa](https://community.homey.app/u/AdvaLa)\
**Post date:** [February 20, 2021, 3:59pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/5 "2021-02-20T15:59:29Z")

</div>

Hi Roy, honestly, I don’t know how. I can’t from the app page, can I?

---

<div class="post-metadata">

**Author:** ![AdvaLa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/advala/32/8666_2.png) [@AdvaLa](https://community.homey.app/u/AdvaLa)\
**Post date:** [February 20, 2021, 4:16pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/8 "2021-02-20T16:16:10Z")

</div>

Thanks Roy, didn’t know that was Adam’s tag… 😃

---

<div class="post-metadata">

**Author:** ![Tolga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tolga/32/12563_2.png) [@Tolga](https://community.homey.app/u/Tolga)\
**Post date:** [February 20, 2021, 5:18pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/9 "2021-02-20T17:18:27Z")

</div>

Hi @norenz,

Always same problem, i tested with enabled / disabled 2 factor authorization.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/6/e61cc6eb7eecb9ad091f4e6b1f9ed4e6643d8d59.jpeg)

---

<div class="post-metadata">

**Author:** ![Tommie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tommie/32/36374_2.png) [@Tommie](https://community.homey.app/u/Tommie)\
**Post date:** [February 21, 2021, 9:43am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/10 "2021-02-21T09:43:13Z")

</div>

Hi @AdvaLa!

I successfully conneted and tested with my gmail account. The trick is, you should enable less secure apps in your Google account: [https://myaccount.google.com/lesssecureapps](https://myaccount.google.com/lesssecureapps)  
When enabled you can try to login with your email address and your password.  
But this only work if you’re not using 2FA.  
When 2FA is enalbed you need to create application password under your google account security tab.  
After that you can login to the email app with that password. Everything else is the same. Username: your email address, host: [imap.gmail.com](http://imap.gmail.com), port: 993, tls check.  
I hope this help!

---

<div class="post-metadata">

**Author:** ![AdvaLa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/advala/32/8666_2.png) [@AdvaLa](https://community.homey.app/u/AdvaLa)\
**Post date:** [February 21, 2021, 11:59am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/11 "2021-02-21T11:59:21Z")

</div>

Got it to work finally. I thought the Access to Less secure apps was a domain setting, but after Tommie’s answer I tried and now indeed het works. Thanks!

---

<div class="post-metadata">

**Author:** ![Tolga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tolga/32/12563_2.png) [@Tolga](https://community.homey.app/u/Tolga)\
**Post date:** [February 21, 2021, 3:46pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/12 "2021-02-21T15:46:32Z")

</div>

Hi @Tommie ,

Thanks, get also connected with your help, its a little bit different on yahoo.

Thanks

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [February 21, 2021, 5:20pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/13 "2021-02-21T17:20:56Z")

</div>

@Tolga How does it work on Yahoo?  
I don’t have Yahoo. I use Zonnet but it is also not working.  
Maybe I can use your info.

---

<div class="post-metadata">

**Author:** ![Tolga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tolga/32/12563_2.png) [@Tolga](https://community.homey.app/u/Tolga)\
**Post date:** [February 21, 2021, 6:04pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/14 "2021-02-21T18:04:42Z")

</div>

Delete

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [February 21, 2021, 6:57pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/15 "2021-02-21T18:57:32Z")

</div>

@Tolga Thank you for this explanation.  
I wil have a look if this is an option for zonnet.

---

<div class="post-metadata">

**Author:** ![Luc\_Thierens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luc_thierens/32/34652_2.png) [@Luc\_Thierens](https://community.homey.app/u/Luc_Thierens)\
**Post date:** [April 7, 2021, 5:49pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/16 "2021-04-07T17:49:33Z")

</div>

Hello, the app is working fine, but impossible for me but impossible to change / modify the tags?

---

<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:** [April 7, 2021, 7:25pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/17 "2021-04-07T19:25:06Z")

</div>

Hi @Luc_Thierens This is how it works, maybe it is of any help.

- Start flow with ‘When email received’ card

- As condition with AND, select Logics, and then select ‘is exactly’ or ‘contains’  

- then, select the ‘tag symbol’

- Now, at the top, you’ll see the so-called Local Tags, these tags come with the IF card ‘when email is received’

- Then select f.i. ‘From (email)’  

- Then fill in the senders’ email address  

- Now the AND card looks like this, the flow will be executed when the senders’ email address is exactly (or contains) the one you entered.  

- Now you can add Logics cards as condition at the AND part, like what’s in the subject, or what’s in the body of the mail message.

---

<div class="post-metadata">

**Author:** ![Luc\_Thierens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luc_thierens/32/34652_2.png) [@Luc\_Thierens](https://community.homey.app/u/Luc_Thierens)\
**Post date:** [April 8, 2021, 6:10am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/18 "2021-04-08T06:10:13Z")

</div>

@Peter_Kawa, You rock, many thanks !

---

<div class="post-metadata">

**Author:** ![Luc\_Thierens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luc_thierens/32/34652_2.png) [@Luc\_Thierens](https://community.homey.app/u/Luc_Thierens)\
**Post date:** [April 25, 2021, 11:41am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/19 "2021-04-25T11:41:35Z")

</div>

![Flow Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/6/960f29269b7c3f9b46f712c1fe8dd9932ff9182e.png)

What is wrong with this flow ? Unable to enbale the flow (stays gray)

---

<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:** [April 25, 2021, 2:08pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/20 "2021-04-25T14:08:11Z")

</div>

Nothing wrong, except “from email is exact [Homey]”.  
If homey is part of the senders’ email address, you should pick the card "from email contains [Homey]

Flows can have 3 states:

1. Bright start button & bright text:  
enabled, and runs with start- & testbutton
2. Dimmed start button & bright text:  
enabled, but only runs with testbutton if a used variable is given a value just for the test purpose.
3. Dimmed start button & dimmed text:  
disabled.

Your flow is a “2.” flow.  
When you push the test button, it’ll ask for (a part of) an email address  
Because while no email has really been received, you “emulate” this by entering the expected data

---

<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:** [April 25, 2021, 2:09pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/21 "2021-04-25T14:09:49Z")

</div>

> [@Luc\_Thierens](#):
>
> Unable to enbale the flow (stays gray)

When you edit the flow, and hit the sprocket icon, you’ll see your flow is enabled.

---

<div class="post-metadata">

**Author:** ![Luc\_Thierens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/luc_thierens/32/34652_2.png) [@Luc\_Thierens](https://community.homey.app/u/Luc_Thierens)\
**Post date:** [April 27, 2021, 5:59am UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/22 "2021-04-27T05:59:08Z")

</div>

Hey Peter, still working on it … when I have some time.  
Every time I ad a TAG the flow is going automatically to state 2.

---

<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:** [April 27, 2021, 10:26pm UTC](https://community.homey.app/t/email-trigger-flows-based-on-incoming-emails/43337/23 "2021-04-27T22:26:52Z")

</div>

> [@Luc\_Thierens](#):
>
> Every time I ad a TAG the flow is going automatically to state 2.

That is how it works, and there’s not something wrong. As I wrote earlier, the value of the tag is supplied / can be supplied by the trigger card.  
While that value isn’t there while you push the test button, you can’t test the flow without interaction.  
But _you can test the flow with the test button when the flow itself is on screen_, and press the test button below on your right. Then you’ll be asked to enter ‘a’ value of the variable / tag, just so the flow can run.  
Hope this is of any help

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