Ai Agent is fetching just first

Ai Agent is fetching first row from Google Sheet instead of fetching all rows from the Sheet

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

This is a known issue with AI Agents and Google Sheets tools. The agent typically only processes the first row of data even when the Google Sheets tool returns multiple rows, as mentioned in [github.com](Agent only returns first row of data despite all rows being returned in sheets tool outpu · Issue #21638 · n8n-io/n8n · GitHub).

Here are some workarounds to try:

• **Modify your tool description**: Be very explicit in the Google Sheets tool description that it should “return ALL rows” and “process EVERY row in the response”

• **Use a Code tool**: Add a Code tool after the Google Sheets tool to format/combine all rows into a single text block that the agent can better process

• **Split the workflow**: Instead of using the agent directly, use a regular Google Sheets node to get all rows, then pass the formatted data to the agent

The issue seems to be related to how agents handle multi-row responses from tools, so restructuring the data flow often helps get around this limitation.