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

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 ?

Have a look at this topic, unfortunately no solution yet what I understand

1 Like

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 and GMX mail.

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

1 Like

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
You do need to authenticate with 2FA when you login to create an app pasword see here 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:

Email-in settings:

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.


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.

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.


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!

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.

1 Like

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

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

1 Like

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.


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!!!!


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

1 Like

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