Merge disparate json data sources for AI analyis

I have 3 different data sources (json) I would like to send for reference with an AI agent node, and they appear as input for the AI tool, but I can only reference the first one with a json reference. I’ve checked the schema of the merged json, and all 3 sources are there, but I can only reference the first. They each have their own unique structures, but that doesn’t come up as a problem when merging. I don’t know how else to get all 3 sources into the node for analysis, but I can’t sadly reference each to reference in my prompt

Please share your workflowy

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

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):
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @origin8,

Please share your workflow JSON code here.
Just select your nodes, copy them, and paste inside a code block like this:

your code here

In the meantime, I’ll try to help based on your description:

N8N executes each node as many times as there are items in the input.
For example, if your JSON input has 3 items, the node will run 3 times—once for each item.

When using an expression like $json.name, you’ll only see the value of the first item in the editor.

However, during execution, the node processes each item separately, using the corresponding value for each run.

Hope that helps! :muscle: If this answers your question, please remember to mark my reply as a solution.

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