IMAP (Gmail) ERROR: Invalid credentials (Failure)

I’m getting this error when trying to use Gmail with IMAP Node.

But, Credentials are correct.

Hey @mcnaveen!

I am sorry to hear that you’re facing issues with the credentials. Are you using your email password or are you using the App Password? Gmail doesn’t you allow to use the email password and we need to generate an App password. You can learn about how to create an App Password here.

Let me know if this helps. :slightly_smiling_face:

3 Likes

Hi, @harshil1712 I created an App Password. But unfortunately while trying to execute the IMAP Node. This error pops up.

image

:white_check_mark: Edit: Enabling Ignore SSL Issues Solved the Issue

very newbie here on n8n -
The google documentation authentication information page is a 404 -Google | Docs
I need to determine what’s wrong with a gmail node query- I’m getting an invalid authentication issue but don’t know how to resolve it. The Oauth creds have full access to all the APIs in google, just to make sure that couldn’t possibly be an issue… Is there a page somewhere that says what that node NEEDS and how it operates interacting with authentication in google so I can debug?

On the same subject, how do I get to the detailed stack traces I keep seeing here? My system doesn’t seem to be producing error output in the GUI and I can’t find documentation on how to get to it or turn it on?

Hey @James_Barnebee,

Welcome to the community :sparkling_heart:

The page doesn’t result in a 404 for me. Can you please let me know from did you get the link? This will help us investigate further.

Can you share which operation you’re using and what query you’re passing? It may be due to an incorrect query.

Are you self-hosting n8n? If yes, you can setup logs following the guide here: Logging in n8n | Docs

I hope this help :slight_smile:

If you have more questions, feel free to create a new topic.

Harshil - the link is in the n8n.io documentation online google docs page - I’m attaching a screen shot.

I figured out my credentials issue late last night and just didn’t have a chance to update my question. My issue was scope attached to the API allowances.

@James_Barnebee the link on this page: Google Docs | Docs?

I just took a look here and it appears to go the right place, Are you still hitting a 404?

FYI - here’s another one- I keep finding these, and am still having issues just using the documentation to find things as simple as session variables and message manipulation

That one does go to a 404.

@harshil1712 it is linking here: Key concepts | Docs it should be going to Key concepts | Docs looks like the change was made back in March.

Thanks @James_Barnebee and @Jon! Looking at the code, it should have been handled by the code itself, not sure what’s going on there. Anyways, we will fix this ASAP :slight_smile:

1 Like

Here’s another one - and the page it’s on, and the link in question -


Can someone point me to some documentation on how to get data from multiple nodes merged? I’m having difficulty passing information from node to node in a workflow without it getting overwritten by following nodes? Normally I’d use session vars in most SOEs, but I can’t find anything in any search for session or user variables using the search box on n8n.io - or searching in this forum for “session” or ? Does n8n have anything or do I need to go create a database to just carry any data across nodes? I know this is VERY basic stuff, but I have yet to find any (non-youtube) documentation or a 101 on how the system works for things like internal node message manipulation and flow control - I’ve been looking for a basic how-to primer on the system itself? (that’s NOT youtube) - I’ve been doing searches and looking at articles, but I can’t find anything basic on stuff like how to get values to pass between nodes without being overwritten every time? (I can manipulate them in functions fine, but then the next node that gets data overwrites everything from the function node?)

@James_Barnebee that link is working for me on that page.

I suspect what you are looking for is in the expression builder, If you click on an input field and select the cog > Add Expression if you select “Nodes” at the bottom on the left you can select a value from any previous node.

Quick Edit: This is the page that explains the expressions for Nodes: https://docs.n8n.io/nodes/expressions.html

hey jon- the page explains what some expressions are, but not how to get to the editor to use them, or when?

I’m having the same issue there as i’m having elsewhere - the n8n.io docs don’t tell me where the expression editor is in the n8n environment, or how to use it? Nor can I find that searching this community? I can’t use the “expression editor” if I can’t find it or figure out how to apply it?
The documentation on the attached page describes what some of the “expressions” are and do, but not how to get to the editor, how to use it, and what each piece does?

So where can I find some documentation on how n8n works? (anything written and not youtube please)

Such as where I can find the expression editor in the GUI, how to use it, etc?

I’m flailing around as I can’t find very basic things in the editor or documentation anywhere on how exactly the GUI works (like where to find the expression editor in the gui), how and when expression should be used as opposed to function or function item (took me a while to figure out the difference there by trial and error), etc? Another good example would be how to access the interactive debugging panel in the cloud version (assuming there is one)? The intro/getting started docs are very basic and don’t go into the message flow manipulation, debugging in the cloud environment, etc?

I’m looking for some written documentation somewhere that describes exactly how the GUI works so I can figure out when to use each node (of the n8n ones) and how? I don’t want to keep asking super basic questions on the community forum, but I can’t find any way to find answers to super basic questions on how the GUI itself functions anywhere?

Hi @James_Barnebee,

I get what you mean, I found it was easier to click around the interface and sort of worked it out from there. The page that shows how to get to the expression editor is in the gif at the top of the page here: Key concepts | Docs

Unless you have something specific in mind that you wanted to do it might be worth starting here: Navigating the Editor UI | Docs which goes over the interface a bit and covers building some workflows.

For each node it can get tricky as there are a lot so it is all work flow dependant, I have made a copy of the documentation as I plan to update some parts that I found confusing when I started using n8n a couple of months ago.

To really help with learning what I did was just jump in on here and go all in, Whenever a question pops up I will load up my instance and check the node to see if I can work it out. For me I learn better by doing rather than reading.

Debugging in the cloud environment is an interesting one I am not sure what you can really do but if you hit an error you normally get a message that will point you in the right direction.

jon- I read those documents, but ignored the video. (I generally skip all video in anything- it’s just always WAY to slow to bother trying to absorb)- Youtube docs and video docs are awful that way. People read and demo at max 100 wpm. Fast readers go through stuff at 400+ wpm - watching an “instructional video” is like watching paint dry, just not as useful or fun normally.

I can now see the editor and get to it. The articles and references do not say how to keep the json data coming from a node (like a copper or gmail node) from being completely overwritten by the following node for a calendar, etc? There’s no information there on how to edit or add or manipulate variables that will survive the flow? (When I go to the editor and docs, I see the other nodes parameters but not the output json from those nodes to pull from, nor how exactly to use that editor to manipulate anything? So how does getting access to previous node parameters help? I can use the function nodes to manipulate the JSON - I’ve got the output I need added as a new “item” in the “items” but every new access node overwrites all the “items”? If I can get any data to stick around, I could simply bypass the problems?) This is super basic session manipulation stuff, but I can’t find any documentation on exactly how it works in n8n? I’ve been trying merge, etc, etc- but I can’t find examples where data survives and gets aggregated across, say, a dozen app calls? and then returned as a single set of “items” or a combined result “item”?

As far as just working it out from there - I’m trying to build entire systems (AI interfaces, workflows, backend AI services, security, etc, etc) and a company out here- I really don’t have time right now to just try to figure stuff out, or debug code, or be a contributor to open source - so I really, really can’t just spend days messing about and hoping for the best- time is a luxury I don’t have.

I had thought the n8n cloud, being a commercial platform - and a paid service - would be able to address some of this? Maybe I’m reaching out to the wrong group here? (I haven’t been able to find a direct help link for paying customers on the cloud version?) The documentation talks about “priority support” but doesn’t say how to get to that support? the only links are to the documentation and the community forums? Any suggestions so I can quit asking basic questions for stuff I just can’t seem to find would be great…

The data shouldn’t be overwritten, If the workflow or node has been ran at least once while you are in the editor you should be able to see the output data in that expression editor at the bottom.

Assuming a sample workflow like this…

In my Set node I have a simple set Foo to Bar

image

If I click on Execute Node and go to the expression editor I can see the data in Set

image

If you are seeing the nodes with no value it would be interesting to see what your workflow is doing.

With the cloud side of things the only “Priority Support” is for those with the Power Plan, I suspect they would send you a special support email address as part of the welcome email.

If you have questions or need help no one will judge you here or if you want I can give you my email address / Discord info and we can chat there.

hey jon- so I tried to use set- but it still doesn’t work
I’m creating a new json string based on parsing data out of all the items in the return value with a function and then adding it as a new “item” to the message
How do I get that VALUE in a string passed along every time so I can ADD to it every time?

I have code like this (below) after every call now, but that doesn’t seem the right way to actually get data out of a return and re-combine it in this platform? There must be some way to pull data from a return in a node, put it into a session var, then add to it as more nodes are called? Some Session variables somehow?

Set doesn’t seem to work as the actual values for the variables aren’t’ there - it just puts a literal string “value” of whatever is literally typed into the “set” node - no variable reference, only direct value? (If there’s some way to pull actual DATA and not just a header from previous nodes with set, I need some documentation on how that actually works, the documentation says to enter a “value” ?) Set is just putting a new “label” into every “item” with whatever “value” i put in the Set node- not useful in this context? I can do that in function by adding to the json directly- which works fine, but is then destroyed by the next call? (and works fine with the code below in the function, but the very next call all “items” are destroyed?)

I need to parse all items, pull data from each, concatenate to a string, carry the string from node to node doing the same to each, and return the result - which should be really straightforward? so far I can’t see how to do it with the system, nodes, functions or set? I can’t even find an example where someone has parsed every item in the set for data, put it into the “items” as a new “item” and then moved it through multiple other data nodes and had it come out with ALL of the parsed data from ALL of the nodes? (Or any combination like that so I can SEE in detail what’s being done)
None of the “example” workflows I can find have functions after each app node call to do this kind of parsing, so I can’t see how the data is getting aggregated or where?

I’m trying to get the value of gmailresponse into some var I can send to the next add the gcalendarresponse, etc- but so far it doesn’t work- as you can see from this screenshot? What am I doing wrong?


in my function node:

var new_items =[];
var responsestring;
var responsestringheader = ' Gmail unread';
responsestring = responsestringheader;

for (var i=0 ; i<items.length ; i++) {
  var snippet = items[i].json.snippet;
  var from = items[i].json.payload.from;
  responsestring = responsestring+' mail number'+i +' snippet '+items[i].json.snippet+' </br> ';
  new_items.push(items[i]);
}

new_items.push({json: {gmailresponse: responsestring}});


return new_items;

The set was just an example to show that you can have node outputs that you can call / use at any point in the workflow after the node has ran which from what I understand was what you are trying to work out.

There are other things to keep in mind like if you are using an email node and it pulls 10 emails you will only see the last value in the editor but most nodes will automatically loop the values so when you use the json reference for the node output key it will automatically run through all 10 as it goes.

Maybe I can put together a sample workflow for you, do you have a simple(ish) task you want to do?

i am trying to pull data from say, google mail and google calendar - pull info from each item in each service, put it into a string and then return the result. - That’s it. I can’t figure out how to just move the data around to parse and aggregate data in the messages as everything i do just gets overwritten by the next node call?

So to use your example, calling gmail before set in my code, I need to take the value of gmailresponse and put it into foo instead of the string “bar” and then make that parameter “foo” available to add to in EVERY subsequent node?