Tools with "Get Many" operations returns only a single item

Describe the problem/error/question

“Get Many” AI Agent tools, like Get Many Gmails, returns only the first item to the Agent.

What is the error message (if any)?

None

Please share your workflow

Share the output returned by the last node

You have one email in your Gmail account.

Information on your n8n setup

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

I just asked the AI to give me the latest emails, and it returned all of them.

Can you show me a screenshot of what your output looks like?

Here the tool reply 50 items, but the LLM can see only the first one

This is interesting, perhaps it has something to do with the fact that it is being called through the agent, that is my guess. Though I have worked with AI agents and other Get Many options and it has worked. Perhaps it has something to do with your prompt?

Weird, I can’t replicate it.

I just copied your same workflow and the same question, and the model returned what it was supposed to.

AI Agent node version 3
n8n v1.119.0

I can see that the tool response is only single item. You can see the Agent gets only single item in the input context.

A workaround that I found is instead of tiggering Gmail tool, I trigger a Workflow with Aggregate node as final step:

But I don’t know why the Gmail tool returns a single item

As I mentioned, it works on AI Agent v3 and n8n v1.119.0.
It also seems that this was a bug which has now been fixed

1 Like

Thank you mohamed3nan, I am using the web version of n8n cloud. Upgrading it to v.1.119.0 (beta) made it work.

1 Like

Thanks @mohamed3nan updating n8n solved the issue

1 Like

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