Google Sheet - manipulating whole sheet

I understand that the basic way of using n8n is to connect systems.
In other words, inject a row into a sheet or update smth.

What about data manipulation…yes here we come into a territory of “why can’t you code a simple app to do that”. The answer is simple, I want it to be KISS and idiot/time-proof. By using google sheet as the “DB” I’m able to connect with what I want and dump data into it…

Ok so the question.
Let’s say we have 2 sheets. One with clients and the other one with payments.
We want to find all active clients and for each of them check when they had the last invoice (or sum all those payments).
If we see that the last payment is more than 3 months old, we want to change a flag on the client to ‘not-active’.

In other words how to use n8n for sheets where we will have multiple records per sheet and work seperately on them. Kinda like iterator :wink:

You should be able to do that with the Batch-Node when you set “Batch Size” to 1.

Some examples can be found here:

That should allow you to query all clients, split into batches of 1 and so iterate over them one by one, query all of its payments, update the flag appropriately and then proceed with the next one.

1 Like