Problem in node ‘Webhook‘ Cannot read properties of undefined (reading 'map')

My chatbot works fine with regular text messages (like “hi” or “hello”), but when I ask something that should pull data from Google Sheets, it fails and shows an error. What should I check or fix?

Describe the problem/error/question

What is the error message (Problem in node ‘Webhook‘

Cannot read properties of undefined (reading ‘map’))?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

I kinda did the same thing before, but dont use sheet like that. Better use node to get all the rows from sheet, then give it to ai agent to give you the specific data that you’re looking for, and make sure to add it in your prompt. Thats how i did.

But you can try something in this current workflow but im not sure if its going to work. which is specifying to the ai agent in the prompt THE TOOLS, and under it the name of the sheet node, and what to use it for, since i noticed that you didnt specify that in the prompt. you should add something like:

THE TOOLS
products_informations: (what it will do it)

If it works like that its good, if not try to add the node to get all rows from sheet before the ai agent agent, then let him analyze it and give you the right data.

I hope this one helps you

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