Error when running google contacts

I set up credentials for the Google Contacts node according to the documentation. But when I run the node, I get an error. I’m executing with the following parameters:

Resource: Contact, Operation: Get All, Limit: 100, Fields: [Email Addresses], RAW Data: true

TypeError: Cannot read property 'length' of undefined
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Contacts/GoogleContacts.node.js:216:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:424:47

If I change the parameter RAW Data to false, I get a different error:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.cleanData (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Contacts/GenericFunctions.js:77:34)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Contacts/GoogleContacts.node.js:214:63)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:424:47

I’m dumb, it was because I had no contacts in my account

1 Like

Sounds like there is still something to fix there so it does a check for 0 contacts.

1 Like