WooCommerce

Hi @bakkbone, from your description it’s not 100% clear to me which node exactly throws the error. However, seeing your logic is working fine for the first item, I suspect what’s happening here is this.

An expression such as {{ $node["WooCommerce"].json["id"] }} would for the first item arriving on its node look up the first item from the WooCommerce node. For the second item it would look up the second item from the WooCommerce node which fails.

So you probably want to always read the first (and only) order ID from your WooCommerce node using an expression such as {{ $("WooCommerce").first().json.id }} (this expression format is fairly new, so you might need to upgrade your n8n version for this to work).

Hope this helps!

1 Like