I’m getting the below error when trying to use the Gmail trigger. I only started using the service earlier today with a cloud trial version and it worked before but it’s possible I changed something that would affect the node. I already tried relogging into Gmail and also creating a new, empty workflow with just this one node but getting the same result. I found a thread about the same error from a few years ago where the cause was a change in the response from the remote service so maybe something changed in the Gmail API just now?
Thanks,
Peter
Version: 1.72.1 (Cloud)
TypeError: Cannot read properties of undefined (reading 'includes') at PollContext.poll (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Gmail/GmailTrigger.node.js:257:50) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:760:32) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:724:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1155:20
Now I can’t activate the workflow with a slightly different error. It was only a gmail trigger and a google sheet update, I deleted the google sheet node and it’s still failing even though running the test workflow runs successfully.
I tried to restart my workspace but that made no difference. Interestingly, exporting it, deleting and then importing from json fixed it and I can activate it now.
Looks like the Node is broken again and not getting triggered since this morning. It’s just a 2 node workflow with a Gmail trigger and a Google Sheet append: sheet second node which mostly has my gmail/sheets info so not sure how I could share any debug that would be useful.
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!
Could you share your workflow? Perhaps something is in you customized configuration that causes the error.
I didn’t want to clear all the (Brave) browser cache just in case I had something for another site I wanted to keep but then not clearing everything for n8n properly so I just fired up my Edge browser that I rarely use and definitely didn’t use for n8n before and getting the same error. Is there any way to tell where the error message is coming from and what it means exatly? I upgraded to Pro from the trial because I thought the comparison somewhere showed more debug info in that tier but not sure how I could access it. The error isn’t from an execution like before but just from trying to activate the workflow.
Yep, still having the same issue. I was told on discord that this thread was mistakenly marked as resolved on their side and that’s why no-one responded and they removed the tag so someone would look at it now but that was days ago. They also said it was a bug they already have a ticket for so I asked them to reply to the thread with more details but it doesn’t look like they did. As I understand without a separate support contract there isn’t any SLA for how quickly they would fix these issues. Not sure if the Gmail node is considered best effort or something, or if there is even any difference between the nodes in terms of support.
I am (was) having the same issue. Here’s what I think is happening.
I haven’t browsed the code, but it looks like this trigger node is storing some kind of internalDate variable.
When it tries to fetch a sample message in the builder, either as a “Fetch Test Event” or when you try to test steps in the work flow, if it can’t find a message that matches based on the internalDate and some other variables (probably your filters), it errors out.
This seems to prevent it not only from testing the steps, but also from saving the workflow for some reason.
Solution: Try sending a message to that email address that matches the selection filter. Try to “Fetch Test Event”. It might - at least it did for me - load. After that, pin the data. That way it won’t try to fetch the event again.
@ihortom As far as I can tell, this is a bug. This operation shouldn’t error out just because it can’t fetch a message fitting some search criteria.
Sorry, guys but I just cannot reproduce the error. The trigger works just fine in both test and production mode for me.
Could anyone share the error stack when it happens in the latest version, please? I tested successfully on my Cloud account v1.76.3 and the GMail trigger version 1.2.
I seem to be on 1.76.1 (self-hosted), so I’ll update to the latest version and see if I can reproduce this.
By error stack do you mean this bit:
TypeError: Cannot read properties of undefined (reading ‘includes’) at PollContext.poll (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Gmail/GmailTrigger.node.js:257:50) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-