SplitInBatches understanding issue

Describe the issue/error/question

Hi there!

I’m trying to migrate the following workflow from make (formerly known as Integromat) to n8n. Sadly I’m having some issues implementing it. First of all let me shortly explain what it (should) do.

We are doing development stuff for our clients (no n8n so far, haha!). For our biggest client we have multiple developers working for them. Each developer has his own Google Calendar for the project and he tracks his working time there. At the end of each week we need to collect the data from all the Google Calendars (one for each developer) and create an invoice for each developer (that’s not the way we would normally do that, but the client requires this).

This is a part of my workflow right now:

The “A” node does setup some variables for a loop. In this example it’s an array of multiple developers working for one of our clients. For each developer it has his name and Google Calendar ID stored.

The first iteration of SplitInBatches works like expected. The entries from Google Calendar for that developer are read and a new Google Sheet with the working hours is created successfully.

But then node “B” returns with e.g. 17 items (Google Calendar events for the first developer).

On the second iteration of the SplitInBatches node the “C” node shows that the SplitInBatches node now returns the first item of the 17 items returned from “B”. But I need the second row/element of the array from node “A” here to proceed (= the next developer from the array created in node “A”, with his own Google Calendar ID and his name).

I hope it’s clear what is failing and what I really want to do it. If not, please ask as I would really appreciate any kind of support.

Information on your n8n setup

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

Thanks for reading so far!

Best,
Sven

Hey @svzi,

That is a lot to get my head around, Out of interest in the Split In Batches node do you have the Reset option enabled? My gut feel is this is likely causing the issue, If it isn’t that it is going to be fun building a mock version of your workflow with some code nodes :slight_smile:

1 Like

Howly cow, thanks @Jon ! I was sure I’ve tried with and without the reset option enabled, but as soon as I turned it off, everything worked like expected. :man_facepalming:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.