[Bug] [Breaking]

Hi @jan, not sure if I should have posted this here or in github, but here it goes…

Some recent update on n8n broke a couple of workflows on my side.

Here’s an example that reproduces the behaviour:

I expected Webhook.site - Test, process and transform emails and HTTP requests to have two requests with the following query parameters:

  • 1st request: value=test1
  • 2nd request: value=test2

But both requests have value=test2

This used to work on previous versions and somehow stopped working. I can see this not working on several other nodes, postgres, airtable and others.

Let me know what other info I should provide to help u debug this.

Ah wow yes, for this case there was then probably breaking change a while ago. In the past expressions choose by default the data of the same run-index. This caused however incredible many problems for many users as they wrote expressions on nodes that got executed 2+ times and referenced data on other nodes which got executed only 1 time (which did then fail). So it got changed that expressions use by default always the data of the last execution as I never came across a case where it was needed differently and the other behavior needed always a lot of strange workarounds. Your case I thought would also still work on the first sight with the new behavior, but it probably breakes because of the order the nodes get added to the stack. As the collector gets added 2x in a row before at least 1x the HTTP Request nodes, this breaks. I am very sorry for that!

To make that work again there are two possibilities. Use on the HTTP Request Node instead of this {{$node["Collector"].json["value"]}} one of the following expressions:

  1. {{$json["value"]}} - That will simply use the incoming data the node receives
  2. {{$items("Collector", 0, $runIndex)[0].json["value"]}} - This says specifically to get the data of the same run-index the current node is on

I see. Yeah it makes sense. I don’t see $json in the documentation. I’m assuming this is new (?). Can u point me to its documentation please?

Tested with $json and it works as expected! Thanks @jan

Edit: Also is there a place we can see the changelog or the release notes?

Yes you are correct $json is not officially documented yet even though it already exists for a while now. I remember that there were some possible issues in some edge-cases and for that reason did I not create documentation yet before I had some time to check it properly.

There is no changelog yet. You would have to look through the Github-logs for now. They clearly state when what version got released. We have planned to add proper changelog soon.

All known breaking changes get documented here:

1 Like