Issue with Node as Tools calling several times with the same arguments

Describe the problem/error/question

I’ve been trying to use Notion Create Database Page “Node as Tools” with several AI Agents (React, Tools, OpenAI Functions) with the fromAI param

Configuration:
I’m getting items from a Notion Database Page and iterating on them with an AI agent. It has several tools. One of them is creating new items in Notion.

I have a recurring problem:

  1. the tool is called twice for each input item

  1. The $fromAI param seems to be using only the params from the initial item (2 different input items created 4 times the same entry in Notion)


Please share your workflow

I need to clean up my workflow because it has many other nodes. I’m wondering if anyone is experiencing it as well?

Information on your n8n setup

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

Hi, we made some fixes around similar issues in 1.67.

Would you mind upgrading and confirming you still have the same problem? If so, we‘ll prioritise looking into it.

Hi David,

Thanks for the quick reply!

No, I’m on the latest release 1.66. I’ll test it with 1.67 when released and let you know.
In the mean time, I’ve used a “call n8n workflow tool” and it works well.

Hi @sirdavidoff,
I just updated my version and rerun my workflow and add a similar issue.

The agent has 7 input items.

The Notion “create insight” node is called once in the whole execution (based on the logs).

The input contains only one element, which is great as the agent only needs to create one insight

but it creates 7 entries in my Notion database. The output contains 7 elements - like if the tool was called for each input item, instead of for only one


Thanks for continuing to investigate, Baptiste.

We’ve identified the issue and are working on a fix. I know you’ve already found a workaround, but another one would be to put the agent inside a loop so that it’s only called with one item at a time.

Thank you!
At the moment, I’m using a sub workflow to create the insight. That’s the great thing about having multiple options.
FYI: I’ve retested it again with the latest version, still having the issue

Hi @sirdavidoff
Im also facing similar issue.
I have a MYSQL Tool node connected to Tools AI Agent which executes query generated by Tools AI Agent.
For repetitive calls to the this tool,it executes the first query only.
In logs it shows the second query.But in backend it executes the first query.

You’re probably aware of it at this stage…
I’ve also tested it with Airtable node tool - “delete record”, it has exactly the same behavior: it only delete the first record (identified by another Airtable node tool - search records)
Same workaround, I use an HTTP request instead which works like a charm.

Thanks for the extra context, @Baptiste_JACQUEMET and @AasimK. We’re working on a fix for this and hope to have it ready soon.

2 Likes

Hi, it’s the same with nocoDB for create, delete, and with Google calendar.
Thanks