Google Sheet contains 2 rows of data, how can I split it to run the flows row by row

Hi, I’m using Google Sheets to store data row by row, and I want to run a series of automations based on each row.

For example, if I have two rows in the sheet, how can I process them individually, so each row triggers a separate execution of the workflow, instead of combining them into a single JSON array with two items?

I understand that when multiple items exist, downstream nodes will run multiple times. However, at the end of the workflow, I need to reference the original Google Sheets row data that triggered each execution. Right now, it seems to only reference the first row, even when processing the second item.

How can I ensure each execution correctly references its respective row throughout the workflow?

Thanks for your help in advance.

Kai

Hello @Kai_C could you please provide the workflow that demonstrates issue and desirable outcome?

Hi, sure — I’m using a self-hosted n8n instance, so I can only describe the setup using screenshots.

Here’s the flow:

The yellow section is used to fetch a list of ID references, which are needed for the “Replace Profile ID & Action ID” node:

The Google Sheets node reads multiple rows of data:

For each row:

  1. The workflow fetches a JSON from the source application using the Source ID.
  2. Then it replaces IDs using the reference list.
  3. Finally, it posts the updated JSON to the destination application action using the Destination action ID from the same row.

Here’s the final POST node:

This step is supposed to POST each row’s data to its corresponding destination action ID (from the same row in the Google Sheet).

  • For example, the first row should post to HOY69SyTWw2JL6Vca9fotw
  • The second row should post to HCz4CkzCBqLI2Utki6XJUg

However, right now both items are being posted using the Destination action ID from the first row only (HOY69SyTWw2JL6Vca9fotw), even when processing the second row’s data.