Hello, I’m using n8n to work with Google Sheets, and I’ve set Header Row = 3 and First Data Row = 5, but despite this configuration, the data always gets inserted starting from row 5554. This is strange because the rows before that (from row 4 to row 5553) are completely empty with no data in them.
What could be causing this, and how can I fix it so that data is inserted starting from the correct row (row 5)?
Any help or suggestions would be greatly appreciated!
I think those options are just to tell n8n where the data is located and then it appends it to the end of that data. Not sure though as I have never used it like that.
Sometimes you have empty rows that you will need to delete first as sometimes it is just being funky.
I received new information regarding my issue. I’m using n8n to input data into Google Sheets, specifically in columns B to M. However, I’ve learned that there is existing data in columns N and beyond, extending to row 5000.
How can I append data into columns B-M without overwriting or affecting the existing data in columns N and beyond? I need to input new data in columns B to M without altering the data or formulas already present in the other columns.
In that scenario you’d need to switch over to update-row strategy. So you’d identify the row where e.g. column B contains no data by reading from the sheet with a filter where column B is “” or null (you need to experiment to find out what actually works) and setting the node option to return the first matching row. This will give a row_number to start adding data from. However this approach is prone to race condition issues. I.e. if the workflow is triggered more than once the concurrently running executions will overwrite each other’s data.
There is also another option. Let’s start with a question “what should happen when your workflow reaches row 5000?” Who’d add data to columns N and further to keep the table consistent? If it is possible that you also append this extra data then you could do this for the rows before row 5000. So in this case it would be relatively safe to remove “extra data” for the rows you need to work with and you’d add this extra data along with newly inserted rows.
How is that even possible? First, you can insert formulas not only static data points. Second you definitely can add computable values. You could also read required data from other sources.
The third strategy would be for you to add data to a different sheet and devise a method to automatically merge it into the target sheet by Google Sheet’s built-in methods, e.g. using ARRAY functions.
Without knowing more about your business case it is hard to suggest aby specific strategy that would work better in your scenario. And I think this goes beyond n8n scope. Feel free DMing me if you think I could be of any help. I may have some capacity to explain the approaches above.