How to update a column for multiple rows in Google Sheets

Hello,

I have a sheet with multiple rows. For each row I do a postgres query and I want to store the response in the sheet ‘is_client’ column for the corresponding row.

I can’t figure a way to use the “update” in google sheets:
Example data:

My workflow:

My sheet:

What i’m doing wrong ?

Thanks a lot,

Matthias

Information on your n8n setup

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

Hi @tthias, the Update operation of the Google Sheets node would try to find the correct row using a key column with a unique value. So assuming your Submission ID column values are unique identifiers, you could use a Set node after your Postgres node to add this column to your items coming from PostgreSQL.

You can then specify the Key in your Google Sheets node as Submission ID for n8n to find the correct row for each update. Just keep in mind that your sheet would also need a count column to write the respective values into.

Thanks a lot, that’s make sense !

Coming from zapier/integromat the way you work with data is a bit different :wink:

1 Like

Hello @MutedJam what if my unique column is combination of multiple column? the columns are brand, store, and channel. How node append or update spreadsheet can reads multiple column? because now there is only one “match on” available. Thanks