Cannot read properties of undefined (reading 'includes') when puttin my gmail. It was working and now it stop

I am new first of all.

I made a flow based on what i have learn I was using my gmail with no problem been able to read all new incoming message and sundenly I was not able to do it more. What is weird is that for sending it works.

Here an image of the flow and the error

Also by any chance can you let me know how I can configure that drive alwas created a google sheet when sending it and not another type of file

Information on your n8n setup

  • n8n version: 1.74.3
  • Database (default: SQLite): I am no using a data base
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): webpage
  • Operating system: windows

I’m receiving the exact same issue for my Gmail Trigger node - all other gmail nodes work.

Information on your n8n setup

  • n8n version: 1.74.3
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker / self-hosted on AWS
  • Operating system: Linux/UNIX

Hi,

Welcome to the forum. I’ll take a look at this to try to help you.

So that i have a little more info, can you expand the “other info” in the error message in your screenshot and share it? sometimes that tells us exactly what the issue is

Also, please embed your workflow into the forum so we can look at it, do that like this:

Please note that this issue is only happening on the ‘Gmail Trigger Node’ as all other Google nodes seems to be functioning. For context, my workflow is a single Gmail Trigger Node.

Error info:

{
“errorMessage”: “Cannot read properties of undefined (reading ‘includes’)”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.74.3 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“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 WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:651:32)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:872:51”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1206:20"
]
}
}

does this happen every time you add a gmail trigger? Even if you add one in a fresh workflow?

Can you add a “webhook” trigger and check to make sure the webhook url matches your instances url with https://?

Correct - this happens every time I add a gmail trigger node, existing workflows and new workflows. Confirming that the webhook url matches my instances url with https://

Now it works again

It seems to be an error in the polling logic under the hood. So sometimes just resetting the node or rebooting it could clear an issue like that, so it could seem intermittent

How do I do this?

I find deleting the node then adding a new one back sometimes fixes issues.

You can also restart your n8n instance, which the method varies depending on how you have it hosted

Issue still persists, even with new workflow, credentials, and instance restart. Very strange how this issue only occurs on the ‘Gmail Trigger Node’ (Gmail action nodes work fine).

It is not very weird because the error is coming from the code related to the trigger node’s polling, which essentially is the process of Gmail checking for new messages.

I tested on both 1.56.2 and 1.74.3 and couldnt reproduce the error.

Its possible that the connection with google is bad. check to make sure your connection is set up right and that gmail has all of the scopes it needs

Has anyone made any progress with this? I am having the exact same issue.
I have tried adding the trigger on a fresh node. Same issue. Also tried restarting the service, same issue.

Other gmail nodes are fine. Tested sending out emails, no problem.

I am running Self Hosted on Render.

Here is my error code:

{
“errorMessage”: “Cannot read properties of undefined (reading ‘includes’)”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.76.0 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“TypeError: Cannot read properties of undefined (reading ‘includes’)”,
" at PollContext.poll (/opt/render/project/src/packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts:312:35)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at WorkflowExecute.runNode (/opt/render/project/src/packages/core/src/execution-engine/workflow-execute.ts:1122:20)“,
" at /opt/render/project/src/packages/core/src/execution-engine/workflow-execute.ts:1503:27”,
" at /opt/render/project/src/packages/core/src/execution-engine/workflow-execute.ts:2064:11"
]
}
}

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