Describe the problem/error/question:
My incoming data contains a single item with an array of line item objects, accessible at {{ $json.line_items }}.
This array contains all the necessary fields (variant_id, quantity, price, title, etc.) for multiple products.
Since the Shopify node UI does not expose a single field to map the entire line_items array in JSON mode, I tried to use parallel .map() expressions in each individual sub-field.
For example, in the Variant ID field, I used: {{ $json.line_item.map(item => item.variant_id) }}. I did the same for Quantity, Price, and Title.
This results in the Shopify node producing the following error, indicating the parallel arrays are not being correctly zipped or the structure is being rejected by the underlying API call.
422 - {"errors":{"line_items":["line item price not found, 'price' must provided."]}}
What is the correct way to create order with multiple items?
This is not only related to Shopify node but also occurs in other nodes, where mapping an entire array is not possible.
Information on your n8n setup
- n8n version: 1.119.1
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): default: own, main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Linux
