Iterator outputs two distinct bundles, but the next module has duplicate output

My scenario watches for new database items in Notion, does some manipulations with that data, then aggregates the data with a text aggregator grouped by person. All of that works fine.

The next step is to create a Google Sheet for each person. I think this works.

Then comes the complication. The goal is to edit each new spreadsheet by adding each of the items that were aggregated above as new rows. (I didn’t state that clearly–the blueprint is included below.) This is where the problem is coming in.

The output of the text aggregator is correct:

And the output of the iterator is correct:

But the output of the Set Variables module immediately after the iterator is wrong:

Am I misunderstanding how the iterator works? Or have I done something wrong? I will note that I have tried both “one cycle” and “one execution” for the variable lifetime and gotten the same incorrect outcome.

mileage reimbursement spreadsheet.blueprint.json (298.3 KB)

Hi @Rebecca_Katz,

The reason you’re getting the wrong output from the Set Variables module right after the iterator is because of the SPLIT function used there. You can remove the Split function and Set Variables module entirely and map the values directly into the Google Sheet instead after the iterator.

1 Like

Thank you for this feedback! I don’t understand how the set variables module caused the problem, but this fixed it, and that’s good enough for me right now. One of these days I’ll be able to set up a scenario all on my own without resorting to the generosity of people in this community, but apparently today is not yet that day!