# Gmail "Email-in" node no longer working with username&password

**URL:** https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683
**Category:** General
**Created:** [2 April 2022 12:22 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683 "2022-04-02T12:22:08Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![PedanticPete](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pedanticpete/32/22386_2.png) [@PedanticPete](https://discourse.nodered.org/u/PedanticPete)
#### Post date: [2 April 2022 12:22 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/1 "2022-04-02T12:22:08Z")

</div>

Hi, I have been checking my gmail fine until today ... found this ...  
" To help keep your account secure, starting **May 30, 2022** , ​​Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password."  
OK it says May not March (my initial ahha moment) but thought it needs sorting out anyway, so I've tried setting up an "app password" but the node is still not working ... and google says that the app password I set up has never been used ... any ideas ?  
Pete

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [2 April 2022 12:51 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/2 "2022-04-02T12:51:10Z")

</div>

Have a look at this [topic](https://discourse.nodered.org/t/sending-e-mail-using-oauth-2-0/59376), unfortunately no solution yet what I understand

---

<div class="post-metadata">

### Author: ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)
#### Post date: [2 April 2022 17:34 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/3 "2022-04-02T17:34:12Z")

</div>

Google turns off "less secure access" periodically, seemingly at Random. Have you tried turning it back on? I had to do that last week. After May 30th I'll either have to figure out how to get app passwords to work, or switch to Telegram for my notifications.

Edit: or find a new Email provider for my alarm system account. I'm looking into [outlook.com](http://outlook.com) and GMX mail.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 April 2022 19:09 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/4 "2022-04-02T19:09:18Z")

</div>

Using App Password is simple. Turn on 2 factor authentication then it gives you the ability to add app passwords.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [2 April 2022 21:04 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/5 "2022-04-02T21:04:29Z")

</div>

> [@wb666greene](#):
>
> After May 30th I'll either have to figure out how to get app passwords to work, or ...

I seem to have said this over and over in recent weeks...

In order to continue using gmail from Node-red, **you have to set up an app password**.  
In order to set up an app password **you have to turn on 2 factor authentication** [as described here](https://www.lifewire.com/how-to-turn-on-gmail-two-factor-authentication-4707927)  
You do need to authenticate with 2FA when you login to create an app pasword [see here](https://www.lifewire.com/get-a-password-to-access-gmail-by-pop-imap-2-1171882) **but the app password bypasses 2FA.**

Make a note of the app password because Google will never let you see it again. Insert this in the Password field of the email node settings.

The Email-out node settings are like this:

 ![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a17fccb5382f3da7efb6a6fd4a88fb4237a3d5.jpeg)

Email-in settings:

 ![Untitled 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a5f1f7c960323fc40fbeea231fe187a98cda7313.jpeg)

Because 2FA is a pain in the arm, it's a good idea to create a gmail address just for Node-red to use.

One thing that tripped me up: I had NR's gmail account set up to forward messages to my real email address _and to mark the message as read_. This setting prevents NR email-in finding messages in the inbox.

---

<div class="post-metadata">

### Author: ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)
#### Post date: [3 April 2022 20:59 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/6 "2022-04-03T20:59:43Z")

</div>

I appreciate the reply, and the clarification of the instructions on setting it up.

My complication is I have three gmail accounts setup for my IOT devices to use. I guess I could consolidate it but so far only one has dropped out at a time as Google keeps turning off the imap access so my "redundancy" has helped keep my system at least partially up when things go wrong.

My simplification is I only need to send Emails, my IOT devices don't need to receive Email messages.

At the end of the day, I'm not seeing how an app password is really different than any other password other than Google created it instead of me (I usually let Chrome "suggest" them so they seem plenty strong and are very hard to type. I guess Google can hash the app password they create with the tracking info they use to make it unique for every device, But I suspect this will make it a major PITA when I restore a failed system and the new IOT system has a different MAC address, and what ever it is they use for their spyware tracking signatures.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [3 April 2022 21:09 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/7 "2022-04-03T21:09:13Z")

</div>

> [@wb666greene](#):
>
> At the end of the day, I'm not seeing how an app password is really different than any other password other than Google created it instead of me

The key difference is the App password can be given permissions to just the resources you want it to access, rather than your entire Google account. That can help reduce the potential security issue if someone gets ahold of the App password. It also gives you the ability to revoke that password without having to reset your entire Google account. For example, if a device is stolen, you can revoke the password it was using.

---

<div class="post-metadata">

### Author: ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)
#### Post date: [3 April 2022 21:41 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/8 "2022-04-03T21:41:50Z")

</div>

Good explanation but these accounts don't do anything but send messages and occasionally receive spam Email. As to what else in in my Google account, other than stuff they put in without my prior approval there should be nothing as I don't have sync enabled, and don't store anything on Google drive. I've never used Hangouts, etc.

So these "benefits" are all pain and no gain for me!

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [3 April 2022 21:51 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/9 "2022-04-03T21:51:51Z")

</div>

> [@wb666greene](#):
>
> At the end of the day, I'm not seeing how an app password is really different than any other password other than Google created it instead of me

As far as Node-red goes, the big difference is it will continue to work after May 30 while your standard gmail credentials won't.

I suppose it's possible Google will eventually stop supporting app passwords too, at which point, like you, I'll be looking for alternatives. I won't be considering outlook dot com though!

> Google keeps turning off the imap access

This is a major pain that can destroy gmail's reliablity for important notifications.  
I have had it happen a couple of times, but not so far since I switched to app passwords. I _hope_ they are immune.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [3 April 2022 22:04 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/10 "2022-04-03T22:04:44Z")

</div>

We seem to be drifting off topic here.  
The OP asked;

> [@PedanticPete](#):
>
> so I've tried setting up an "app password" but the node is still not working ... and google says that the app password I set up has never been used ... any ideas ?

...and not the general discussion about the merits or otherwise of app passwords, or spam emails.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [3 April 2022 22:10 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/11 "2022-04-03T22:10:20Z")

</div>

Good point. That's why I posted pics of my email nodes, in case PedanticPete has his set up differently.

I doubt if it's relevant to PedanticPete's case, but gmail from Node-red on my Raspberry Pi was not working until I disabled IPv6. The node threw a Timeout error.

---

<div class="post-metadata">

### Author: ![PedanticPete](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pedanticpete/32/22386_2.png) [@PedanticPete](https://discourse.nodered.org/u/PedanticPete)
#### Post date: [4 April 2022 20:06 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/12 "2022-04-04T20:06:06Z")

</div>

Thanks for all the advice, finally got the App Password working, was useful to have clarification from jbudd that I had set it up properly, seemed I might have missed a 2FA alert whilst panicking and resetting everything.

I suffer from Node-Red being so good at just sitting in the background doing tasks dealing with MQTT stuff and some influx stuff, I have set up that I never or very rarely have to revisit, each time I come back it takes me ages to remember how I was doing things ... I am not well 'practised', the google mail I use monitors a mail folder to check for a shopping list from me or my wife and prints is out on a thermal printer.

I need to spend some time cleaning up my nodes and commenting them better ...I am hoping that the App Password will provide a bit more stability as the previous method needed the node restarting once a month .... thanks again for all of your inputs, it is such a fantastic support system you kind people provide!!!!

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [5 April 2022 11:02 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/13 "2022-04-05T11:02:33Z")

</div>

> [@PedanticPete](#):
>
> I need to spend some time cleaning up my nodes and commenting them better

That's what I'm also doing (spring cleaning 😁).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 June 2022 11:03 UTC](https://discourse.nodered.org/t/gmail-email-in-node-no-longer-working-with-username-password/60683/14 "2022-06-04T11:03:29Z")

</div>

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