How to get data from spreadsheet to nocodb using n8n

Hi. Can someone help me with this?

What I want is to get all data in spreadsheet and upload it to nocodb using n8n workflow automatically… after that, when i am going to update the spreadsheet, i want it to update nocodb also. is that possible? if so, how?

Hi @eveer,

It is possible, let me try to list steps you need to take.

You are mentioning 2 different flows (it is possible to merge them later but for sake of simplicity I will explain one by one)

    1. how to read & update all data from spreadsheet to NocoDB
    1. how to sync new spreadsheet data to NocoDB

On the first one:
You will need NocoDB node and Google Sheets node, you can use Get Many Rows from Google Sheets node to read your records and later push them using Create action from NocoDB node.
!! You need to format read records as JSON array before pushing to match the format in your table !!

On the second one:
In order to achieve this you need to use Google Sheets trigger to detect all inserts & updates.
From the trigger you need to use Create or Update a row functionality of NocoDB node based on the operation.
Trick here is you need to detect if record exist on NocoDB and if it exists you need to get PK to update record.
In order to achieve this you can search record using values (optimally a unique value or it can lead unexpected behavior) with Get Many (limit 1). If it returns empty you can use Create else you can use Update a row with returned Id (PK).

I hope this is clear enough, feel free to ask if you have any questions & concerns.