How to Insert an Array of Objects into Google Sheets using n8n?

Hello everyone,

I’m working on a workflow where I receive data in the form of an array of objects via a webhook. Each object contains user details, and I need to insert this data into a Google Sheet, with each object corresponding to a new row.

Here is an example of the data structure I’m dealing with:

{
  "usersToAdd": [
    {
      "First Name": "vGKVg",
      "Last Name": "qmGPQ",
      "Team Name": "fdsafsd",
      "Email": "[email protected]",
      "Contact": "9669747345",
      "Gender": "male",
      "State": "Maharashtra",
      "Pincode": "059367",
      "College": "VJTI",
      "Year": "FE",
      "Degree": "M.E",
      "Github URL": "https://github.com/jxkJMUSD",
      "Leader": "[email protected]"
    },
    {
      "First Name": "DLPpi",
      "Last Name": "bJYHT",
      "Team Name": "fdsafsd",
      "Email": "[email protected]",
      "Contact": "9217156939",
      "Gender": "female",
      "State": "West Bengal",
      "Pincode": "090128",
      "College": "VIT",
      "Year": "TE",
      "Degree": "B.Tech",
      "Github URL": "https://github.com/abcXYZ",
      "Leader": "[email protected]"
    }
    // ...more objects
  ]
}

Information on your n8n setup

  • n8n version: 1.55.3
  • Database (default: SQLite):
  • Running n8n via: n8n cloud

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

You need to split out the data first, so you can work with each object separately. Here is an example:

2 Likes

Thank you @octionic for your help, my problem is solved now, again many thanks.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.