Hey everyone, I am currently trying to setup an automation to store data from WooCommerce into ERPNext system using n8n.
However, I’m struggling with Sales Order List creation as it keeps showing this error:
500 - {“exception”:“TypeError: ‘str’ object does not support item assignment”}
I think it’s most likely to do with “Items” that is referred to other table (DocType is “Sales Order Item”. I tried searching “Items” in field of ERP Node in n8n but it showed it doesn’t exist.
Below is the value that I intend to put for Items field once I can find it:
{
“doctype”: “Sales Order Item”,
“item_code”: {{$json[“line_items”][“order”]}},
“qty”: {{$json[“line_items”][“quantity”]}},
“rate”: {{$json[“calculated_price”]}},
“amount”: {{$json[“itemtotal_price”]}}
}
Please help, thanks.