Need help to convert a Json to Google Sheet

Describe the issue/error/question

I’m not able to convert a Json to Google Sheet

What is the error message (if any)?

All the data are put in the first row and I would like to split them like a real Table

Please share the workflow

![image|690x249](upload://qQmpGwTMXOKJmdamwurPkv4x2Dr.png)
So I do a HTTP request who return a json like this.

[
{
"total": 2196,
"rows": [
{
"id": 4042,
"name": "PHO-GGL-01",
"asset_tag": "TAG-003527",
"serial": "GA03165-GB",
"model": {
"id": 602,
"name": "Google pixel 6 Pro"
},
"model_number": "6 Pro",
"eol": null,
"status_label": {
"id": 2,
"name": "Ready to Deploy",
"status_type": "deployable",
"status_meta": "deployed"
},
"category": {
"id": 13,
"name": "Phones"
},
"manufacturer": {
"id": 44,
"name": "Google"
},
"supplier": null,
"notes": "ESIM ID 89033023426200000000006572135118",
"order_number": "65290686",
"company": {
"id": 1,
"name": "Pix4D SA (Switzerland)"
},
"location": null,
"rtd_location": null,
"image": "https://pix4d.snipe-it.io/uploads/models/assetmodel-image-9P07kWcJeN.jpg",
"qr": "https://pix4d.snipe-it.io/uploads/barcodes/qr-tag-003527-4042.png",
"alt_barcode": "https://pix4d.snipe-it.io/uploads/barcodes/c128-tag-003527.png",
"assigned_to": {
"id": 445,
"username": "cchihai",
"name": "Corina Chihai",
"first_name": "Corina",
"last_name": "Chihai",
"employee_number": "PIX405",
"type": "user"
},
"warranty_months": "24 months",
"warranty_expires": {
"date": "2024-06-01",
"formatted": "01.06.2024"
},
"created_at": {
"datetime": "2022-06-01 11:50:56",
"formatted": "01.06.2022 11:50"
},
"updated_at": {
"datetime": "2022-06-01 13:34:55",
"formatted": "01.06.2022 13:34"
},
"last_audit_date": null,
"next_audit_date": {
"date": "2023-06-01",
"formatted": "01.06.2023"
},
"deleted_at": null,
"purchase_date": {
"date": "2022-06-01",
"formatted": "01.06.2022"
},
"last_checkout": {
"datetime": "2022-06-01 13:34:55",
"formatted": "01.06.2022 13:34"
},
"expected_checkin": null,
"purchase_cost": "793.87",
"checkin_counter": 0,
"checkout_counter": 1,
"requests_counter": 0,
"user_can_checkout": false,
"custom_fields": {
"Invoice_Number": {
"field": "_snipeit_invoice_number_2",
"value": "27871157",
"field_format": "ANY"
},
"Net_purchase_price": {
"field": "_snipeit_net_purchase_price_3",
"value": "855 CHF",
"field_format": "ANY"
},
"IMEI": {
"field": "_snipeit_imei_5",
"value": "357721788434686",
"field_format": "NUMERIC"
}
},
"available_actions": {
"checkout": true,
"checkin": true,
"clone": true,
"restore": false,
"update": true,
"delete": false
}
},
{
"id": 4043,
"name": "LAP-CH-537",
"asset_tag": "TAG-003528",
"serial": "FVFHR2PBQ05P",
"model": {
"id": 554,
"name": "MacBook Pro (16-inch, 2021)"
},
"model_number": null,
"eol": {
"date": "2025-06-01",
"formatted": "01.06.2025"
},
"status_label": {
"id": 2,
"name": "Ready to Deploy",
"status_type": "deployable",
"status_meta": "deployable"
},
"category": {
"id": 5,
"name": "PC Laptop"
},
"manufacturer": {
"id": 8,
"name": "Apple"
},
"supplier": {
"id": 17,
"name": "Apple"
},
"notes": null,
"order_number": "1016980879",
"company": {
"id": 1,
"name": "Pix4D SA (Switzerland)"
},
"location": {
"id": 1,
"name": "Lausanne Office"
},
"rtd_location": {
"id": 1,
"name": "Lausanne Office"
},
"image": "https://pix4d.snipe-it.io/uploads/models/assetmodel-image-uzzCy1SHDK.PNG",
"qr": "https://pix4d.snipe-it.io/uploads/barcodes/qr-tag-003528-4043.png",
"alt_barcode": "https://pix4d.snipe-it.io/uploads/barcodes/c128-tag-003528.png",
"assigned_to": null,
"warranty_months": "24 months",
"warranty_expires": {
"date": "2024-06-01",
"formatted": "01.06.2024"
},
"created_at": {
"datetime": "2022-06-07 17:10:43",
"formatted": "07.06.2022 17:10"
},
"updated_at": {
"datetime": "2022-06-07 17:10:43",
"formatted": "07.06.2022 17:10"
},
"last_audit_date": null,
"next_audit_date": {
"date": "2023-06-07",
"formatted": "07.06.2023"
},
"deleted_at": null,
"purchase_date": {
"date": "2022-06-01",
"formatted": "01.06.2022"
},
"last_checkout": null,
"expected_checkin": null,
"purchase_cost": "1,588.00",
"checkin_counter": 0,
"checkout_counter": 0,
"requests_counter": 0,
"user_can_checkout": true,
"custom_fields": {
"Invoice_Number": {
"field": "_snipeit_invoice_number_2",
"value": "AJ02762061",
"field_format": "ANY"
},
"Net_purchase_price": {
"field": "_snipeit_net_purchase_price_3",
"value": "1710.28",
"field_format": "ANY"
},
"Operating_System": {
"field": "_snipeit_operating_system_4",
"value": "MacOS",
"field_format": "ANY"
},
"Keyboard Layout": {
"field": "_snipeit_keyboard_layout_23",
"value": "CH-FR",
"field_format": "ALPHA-DASH"
}
},
"available_actions": {
"checkout": true,
"checkin": true,
"clone": true,
"restore": false,
"update": true,
"delete": true
}
}

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

I would like to have 1 item per row and not all append together

Can you please help me, it’s my first time on n8n

Best

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

The JSON you are posting is not showing up as valid on JSONlint.com. Any chance you could double check your outputs? I fixed your closing brackets, so just want to double check you actually meant this:

[
    {
        "total": 2196,
        "rows": [
            {
                "id": 4042,
                "name": "PHO-GGL-01",
                "asset_tag": "TAG-003527",
                "serial": "GA03165-GB",
                "model": {
                    "id": 602,
                    "name": "Google pixel 6 Pro"
                },
                "model_number": "6 Pro",
                "eol": null,
                "status_label": {
                    "id": 2,
                    "name": "Ready to Deploy",
                    "status_type": "deployable",
                    "status_meta": "deployed"
                },
                "category": {
                    "id": 13,
                    "name": "Phones"
                },
                "manufacturer": {
                    "id": 44,
                    "name": "Google"
                },
                "supplier": null,
                "notes": "ESIM ID 89033023426200000000006572135118",
                "order_number": "65290686",
                "company": {
                    "id": 1,
                    "name": "Pix4D SA (Switzerland)"
                },
                "location": null,
                "rtd_location": null,
                "image": "https://pix4d.snipe-it.io/uploads/models/assetmodel-image-9P07kWcJeN.jpg",
                "qr": "https://pix4d.snipe-it.io/uploads/barcodes/qr-tag-003527-4042.png",
                "alt_barcode": "https://pix4d.snipe-it.io/uploads/barcodes/c128-tag-003527.png",
                "assigned_to": {
                    "id": 445,
                    "username": "cchihai",
                    "name": "Corina Chihai",
                    "first_name": "Corina",
                    "last_name": "Chihai",
                    "employee_number": "PIX405",
                    "type": "user"
                },
                "warranty_months": "24 months",
                "warranty_expires": {
                    "date": "2024-06-01",
                    "formatted": "01.06.2024"
                },
                "created_at": {
                    "datetime": "2022-06-01 11:50:56",
                    "formatted": "01.06.2022 11:50"
                },
                "updated_at": {
                    "datetime": "2022-06-01 13:34:55",
                    "formatted": "01.06.2022 13:34"
                },
                "last_audit_date": null,
                "next_audit_date": {
                    "date": "2023-06-01",
                    "formatted": "01.06.2023"
                },
                "deleted_at": null,
                "purchase_date": {
                    "date": "2022-06-01",
                    "formatted": "01.06.2022"
                },
                "last_checkout": {
                    "datetime": "2022-06-01 13:34:55",
                    "formatted": "01.06.2022 13:34"
                },
                "expected_checkin": null,
                "purchase_cost": "793.87",
                "checkin_counter": 0,
                "checkout_counter": 1,
                "requests_counter": 0,
                "user_can_checkout": false,
                "custom_fields": {
                    "Invoice_Number": {
                        "field": "_snipeit_invoice_number_2",
                        "value": "27871157",
                        "field_format": "ANY"
                    },
                    "Net_purchase_price": {
                        "field": "_snipeit_net_purchase_price_3",
                        "value": "855 CHF",
                        "field_format": "ANY"
                    },
                    "IMEI": {
                        "field": "_snipeit_imei_5",
                        "value": "357721788434686",
                        "field_format": "NUMERIC"
                    }
                },
                "available_actions": {
                    "checkout": true,
                    "checkin": true,
                    "clone": true,
                    "restore": false,
                    "update": true,
                    "delete": false
                }
            },
            {
                "id": 4043,
                "name": "LAP-CH-537",
                "asset_tag": "TAG-003528",
                "serial": "FVFHR2PBQ05P",
                "model": {
                    "id": 554,
                    "name": "MacBook Pro (16-inch, 2021)"
                },
                "model_number": null,
                "eol": {
                    "date": "2025-06-01",
                    "formatted": "01.06.2025"
                },
                "status_label": {
                    "id": 2,
                    "name": "Ready to Deploy",
                    "status_type": "deployable",
                    "status_meta": "deployable"
                },
                "category": {
                    "id": 5,
                    "name": "PC Laptop"
                },
                "manufacturer": {
                    "id": 8,
                    "name": "Apple"
                },
                "supplier": {
                    "id": 17,
                    "name": "Apple"
                },
                "notes": null,
                "order_number": "1016980879",
                "company": {
                    "id": 1,
                    "name": "Pix4D SA (Switzerland)"
                },
                "location": {
                    "id": 1,
                    "name": "Lausanne Office"
                },
                "rtd_location": {
                    "id": 1,
                    "name": "Lausanne Office"
                },
                "image": "https://pix4d.snipe-it.io/uploads/models/assetmodel-image-uzzCy1SHDK.PNG",
                "qr": "https://pix4d.snipe-it.io/uploads/barcodes/qr-tag-003528-4043.png",
                "alt_barcode": "https://pix4d.snipe-it.io/uploads/barcodes/c128-tag-003528.png",
                "assigned_to": null,
                "warranty_months": "24 months",
                "warranty_expires": {
                    "date": "2024-06-01",
                    "formatted": "01.06.2024"
                },
                "created_at": {
                    "datetime": "2022-06-07 17:10:43",
                    "formatted": "07.06.2022 17:10"
                },
                "updated_at": {
                    "datetime": "2022-06-07 17:10:43",
                    "formatted": "07.06.2022 17:10"
                },
                "last_audit_date": null,
                "next_audit_date": {
                    "date": "2023-06-07",
                    "formatted": "07.06.2023"
                },
                "deleted_at": null,
                "purchase_date": {
                    "date": "2022-06-01",
                    "formatted": "01.06.2022"
                },
                "last_checkout": null,
                "expected_checkin": null,
                "purchase_cost": "1,588.00",
                "checkin_counter": 0,
                "checkout_counter": 0,
                "requests_counter": 0,
                "user_can_checkout": true,
                "custom_fields": {
                    "Invoice_Number": {
                        "field": "_snipeit_invoice_number_2",
                        "value": "AJ02762061",
                        "field_format": "ANY"
                    },
                    "Net_purchase_price": {
                        "field": "_snipeit_net_purchase_price_3",
                        "value": "1710.28",
                        "field_format": "ANY"
                    },
                    "Operating_System": {
                        "field": "_snipeit_operating_system_4",
                        "value": "MacOS",
                        "field_format": "ANY"
                    },
                    "Keyboard Layout": {
                        "field": "_snipeit_keyboard_layout_23",
                        "value": "CH-FR",
                        "field_format": "ALPHA-DASH"
                    }
                },
                "available_actions": {
                    "checkout": true,
                    "checkin": true,
                    "clone": true,
                    "restore": false,
                    "update": true,
                    "delete": true
                }
            }
        ]
    }
]

Here’s how I would do it, copy and paste this directly into your n8n canvas, delete the mock data node, and then replace it with the node that is receiving the data (guessing webhook). Make sure your headers are set in the sheet and this should parse it out correctly:

1 Like

Thanks man, its exactly what I need.

Best

1 Like