Detailed back ground information & issue I am facing:
So I have a workflow which calls the AI Agent. Note that this method is a batch processing workflow, meaning it scans my postgres database after the daily trigger and grabs all (1 or many) entries which have a specific value in a column.
After this, it makes some documents and does some AI processing based on the data in the postgres database. Everything up until after the Merge node is fine.
The issue shows up at the OutputAgent
node all the way to the top right.
Let me describe the issue a bit more with an example:
Let’s say that I have got 3 entries in my postgres database that need to be processed, so it will get these 3 entries, and you can see that in this current execution screenshot that I have shown (directly below if you scroll down), there are 3 executions in all the three middle intermediary agents, the Business Extractor
, ContactExtractor
and ProductExtractor
. That is correct ,there should be 3 because there are 3 separate rows (in this example run) that need to be processed as per my postgres database. Now the merge node has 9 items because I am in mode APPEND. But the problem is I think this is appending incorrectly, because it is appending all the three results from the first Agent the Business Extractor
all together, and then the three from the Contact Extractor all together, and then the three from the final one all together. But I don’t want that structure, I need it to append the results of the three agents per ROW together, and then move on to the next one.
In my OutputAgent I need it to reference the information from the Business Extractor
, ContactExtractor
, and ProductExtractor
per each row. And also, in my final agent OutputAgent
it is saying it will execute 9 times? I only need it to execute 3 times, taking the information from the prior 3 agents (Business Extractor
, ContactExtractor
, and ProductExtractor
). I’m just confused, how do I structure this properly, do I need to have another node after the merge that re-arranges it before it passes it into the final OutputAgent
? Because right now I can’t properly grab the information I need from the Merge node to pass in to the OutputAgent
But how do I have it so that it properly grabs the right element without me having to hardcode these values in cause they’ll fail for anything other than batch size of 3…
If someone can please help me with this i’d really appreciate it, I can pay for your time, I just need some help quickly with this.
No error message, I can’t even figure it out. I tried doing some stuff but I got an error message saying no path back to node, that lead me down the path that I need a Merge node, but maybe I also need something after the merge node, before the OutputAgent
?
Information on your n8n setup
- n8n version: 1.89.2
- Database (default: SQLite): Postgres, using AWS RDS
- n8n EXECUTIONS_PROCESS setting (default: own, main): Not sure what this is, im sorry, I am testing the workflow now and then will have it run on a trigger daily or weekly.
- Running n8n via (Docker, npm, n8n cloud, desktop app): I am running it via the website, and will deploy it on n8n I believe, not docker, not npm, and I don’t have an actual app for it on my laptop.
- Operating system: Macbook M1 Pro, MacOs Sequoia 15.3.2