Call n8n Workflow tool only uses one of the items

Hi!

EDIT: forgot to pase the workflows with the </> button

I ran into a strange problem. I think.

I have two workflows. One watches any file added into a Google Drive folder.
I tested adding 3 files and get 3 items, each one for each file. Google Drive got them alright.
They are sent to OpenAI Message model. It uses a Call n8n Workflow Tool, which gets the 3 items, but only repeats the first item 3 times.

In the second workflow, which is to read PDF files (I’ll add another for image files), the file is downloaded, the text read, and then processed by ChatGPT. Then returns to the father workflow and records the processed data into a Google Sheets.

The problem as I stated, is that the Call n8n workflow tool repeats the first item 3 times, and not sends the other two, on their respective turn.

So, onto my Call n8n Workflow tool:
The workflow inputs are two:
id (the file id): {{ $json.id }}
file URL: {{ $json.webViewLink }}

The called workflow starts with the When Executed by Anothe Module module:
Input Data Mode: Define Using JSON Example
JSON Example:
{
“file_URL”: “”,
“id”: “”
}

They should work with three ids:
132-jPdWBT4n07tWcYote9li9zToYJkW3
1VUlyzJtP_xciAJx9r41DexATbmAGmQ3L
1F7o5Jf57YkScrYKHWhWadgqgA79rPr-K

The first id is the only one processed. Strange.

I’m copying the workflows from the Executions. The Called workflow is from an execution that should have had the second id but got the first.

Father Workflow:

Called Workflow:

Information on your n8n setup

  • n8n version: 1.88.0
  • Database (default: SQLite): Postgres (On Supabase)
  • n8n EXECUTIONS_PROCESS setting (default: own, main): (I can’t say)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (On Render)
  • Operating system: Windows 10

Hi,

Its unclear to me whether you get 3 seperate execution or you get an array of ids in the original trigger.

Your description in your main openAI model is way too simplistic…
Analiza este documento: {{ $json.id }}

Analyze these documents {{ $json.id }}
If there is more than 1 document, send them one by one.

otherwise if they are 3 individuals elements you could use a loop?

reg,
J.

Hi, thanks for answering! The first prompt on the Message Model is very simple. It works because it sends to the second workflow on the second Message Model.

How to work with a loop? I mean, as far as I know, each item gotten by the Google Drive trigger follows the workflow one by one. As soon as one ends, it waits 2 minutes to get the second, and the third, etc.

I see now that there is no pinned data. I will have to get it, I hope to do it later today.

I am sorry that I cannot get pinned data from 3 items, so I took screenshots from the Execution logs. I hope they clear up my questions:

Parent workflow, (execution 75) main workflow view:

Parent workflow, (execution 75), node Call Workflow, run 1 of 3. The one that gets the id that works fine on the child workflow the three times.

Parent workflow, (execution 75), node Call Workflow, run 2 of 3. This id is not get by the workflow.

Parent workflow, (execution 75), node Call Workflow, run 3 of 3. This id is also not get by the workflow.

Child workflow, (execution 76), main workflow view. One item, correct id.

Child workflow, (execution 76), first node. One item, correct id.

Child workflow, (execution 77), main workflow view. One item, wrong id, so it gets the same first id from run 1 of 3.

Child workflow, (execution 77), main workflow view. One item, wrong id, so it gets the same first id from run 1 of 3.