Confusion about "returns" vs "outputs"

Is what a node “returns” the same as what it “outputs”? The terms seem to be used interchangeably in the docs and editor, yet they don’t seem to be the same
thing when testing a workflow - at least when there’s binary data involved.

For instance, enabling the “Raw Body” setting for the Webhook node, I see the following on the output (right) side of the screen…

That is apparently a binary representation of the raw body, but I can’t seem to inspect it to see the actual value.

When I click on one of the other toggles at the top, then I see something else entirely…

That appears to be the actual “output”, but the raw body is nowhere to be found. Thus, Table, JSON, and Schema seem to be different views of the same output, whereas Binary shows different output altogether - i.e. the “data”.

I find this quite confusing. Is the binary data the “return” value and the other stuff the “output”, or are they both different types of output? The view toggle at the top implies you can switch between 4 different views of the same data, but that’s clearly not the case.

Can someone untangle this for me? Thanks for any info or insights.

 
 

Information on your n8n setup

  • n8n version: 1.58.2
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: macOS (dev), Ubuntu (prod)

Hey @shot , good questions. The confusion comes from the way the returned data (or output) is represented in the UI vs the actual data returned. The UI representation is an abstraction layer to the returned data. What is actually returned is described in Data structure | n8n Docs.

When using an expression or code you have to bear in mind the structure of the data. It is universal how the nodes output the data.

Hopefully it helps.

1 Like

Thanks, @ihortom. I did see that in the docs, but I guess I just don’t understand why the UI doesn’t simply reflect the underlying data structure. Anyway, thanks for the reply. :slightly_smiling_face:

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