Hey! I have a JSON array of objects that I’m trying to process through an AI Agent node. The issue is that the array is quite large (~30+ items) and adding it to the entire array is not feasible to the AI Agent. I’ve tried implementing the Loop Over Items node, but find that I cannot get the loop to work after the initial run of the AI agent.
Describe the problem/error/question
Trying to split up a JSON object array to be fed to an AI agent, and keep the workflow going with the next set of objects after the AI Agent completes its task.
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
This is the truncated output from the first time the “Loop Over Product Batches” node is run after setting the batch amount to 6. However, I have 35+ items.
[
{
"State": "Packaged",
"Base Product": "Bottle",
"Format": "500mg",
"Unit": "ea",
"Brand": "VitaCore",
"Product Line": "Berberine 500 mg Capsules",
"GTIN": "10385729461028"
},
{
"State": "Packaged",
"Base Product": "Box",
"Format": "100g",
"Unit": "ea",
"Brand": "HealthBloom",
"Product Line": "Collagen Peptides Powder",
"GTIN": "10385729462589"
},
{
"State": "Packaged",
"Base Product": "Bottle",
"Format": "1000mg",
"Unit": "ea",
"Brand": "NutriLife",
"Product Line": "Vitamin C 1000 mg Tablets",
"GTIN": "10385729463214"
},
{
"State": "Packaged",
"Base Product": "Pouch",
"Format": "250g",
"Unit": "ea",
"Brand": "PureEssentials",
"Product Line": "Plant-Based Protein Powder",
"GTIN": "10385729464793"
},
{
"State": "Packaged",
"Base Product": "Bottle",
"Format": "250mg",
"Unit": "ea",
"Brand": "Nature's Harmony",
"Product Line": "Omega-3 Fish Oil Softgels",
"GTIN": "10385729465812"
},
{
"State": "Packaged",
"Base Product": "Bottle",
"Format": "400mg",
"Unit": "ea",
"Brand": "ActiveForm",
"Product Line": "Magnesium Glycinate 400 mg",
"GTIN": "10385729466987"
}
]
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): n8n cloud
- Operating system:
