Email Trigger (IMAP) - Error: Invalid credentials (Failure)

Describe the problem/error/question

Yesterday, I had setup an Email Trigger (IMAP) with GMail. After resolving issues with authenticating by turning on access to less secure apps it worked.

What is the error message (if any)?

This morning however, I want to continue developing and find that the node now returns:
Error: Invalid credentials (Failure)

I had not changed anything to the Gmail settings or password.

Meanwhile I changed the password and retried with that but that also didn’t work.

Share the output returned by the last node

Error: Invalid credentials (Failure) at Connection._resTagged (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Connection.js:1502:11) at Parser.<anonymous> (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Connection.js:194:10) at Parser.emit (node:events:514:28) at Parser.emit (node:domain:489:12) at Parser._resTagged (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:175:10) at Parser._parse (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:139:16) at Parser._tryread (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:82:15) at TLSSocket.Parser._cbReadable (/home/jd/.nvm/versions/node/v18.17.0/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:53:12) at TLSSocket.emit (node:events:514:28) at TLSSocket.emit (node:domain:489:12)

Information on your n8n setup

  • n8n version: 1.49
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu

Hi @drj ,

Did you sign up using your own normal gmail password or through Google’s app password?

Hi @mariana-na, I am using the email and password of the account, no app passwords because that is no longer available in my account, it seems I am one of the first batch of accounts where enabling this is no longer possible due to Google deprecating this method.

Google is deprecating access to “less secure” apps using users’ credentials, in favour of OAuth methods starting September 30th.
However, the use of app passwords will still be supported. To be able to use this your account needs to have 2-step verification enabled though.

You can read the details of the change here: Google Workspace Updates: Beginning September 30, 2024: third-party apps that use only a password to access Google Accounts and Google Sync will no longer be supported; And some similar user doubts here: https://www.googlecloudcommunity.com/gc/Workspace-Q-A/Will-App-Passwords-work-for-IMAP-after-Sept-30-2024/m-p/715290

In case this is not something you want to do, you could try using the Gmail Trigger Node instead, as that one works with OAuth. Gmail trigger | n8n Docs

Let us know how you get on! :dizzy:

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