Access output of Sub nodes?

Describe the problem/error/question

Is there a way to access the output of (AI) subnodes?

I would like to access the raw output of subnodes instead of just accessing the output of the main node (which does not have relevant info such as token usage and partial outputs).

Of all the available properties for subnodes (pairedItem,isExecuted,itemMatching,item,first,last,all,context,params), the only ones which seems to retrieve any information are isExecuted and params, but no reference to the output of subnodes is available, for example, trying to access .all() i get the error [No data found from main input]

Information on your n8n setup

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

Hey @miguel-mconf!

That question was answered already here: Retrieving Token Usage from Summarization Chain

1 Like

Hey, thank you for you answer!

I’ve found it’s possible to access subnode data through the main node, so since this is vital to my application, I’m rewriting my workflow using the LangChain Code Node, where I can access the subnode execution data.

1 Like

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