Iterator only passing one sub-array value

Hi there,

I’ve searched around a bit, but can’t get this working in a way that makes sense.

I’m trying to iterate through multiple items purchased in a cart, and pass each of those item’s options through, and then write those as individual records to Airtable, but it’s not behaving as I’d expect.

The iterator works great and creates the records, but only the first item option is recorded, even though I can map them all when I set it up. Here are a few screenshots to better explain.

Here’s how it’s setup, with all 4 variables mapped.
Screen Shot 2023-08-24 at 11.13.07 AM

But once a webhook comes through, those options 2-4 don’t write to Airtable. Here’s the output from Iterator
Screen Shot 2023-08-24 at 11.04.17 AM

But then when I try to troubleshoot why, it seems that the Airtable is only receiving this data (which is different from the previous bundle’s output).

As a final “twist”, while mapping these 4 item options is great (Badge Name, Organization, etc), other products have different options. So ideally, I’d rather it just output as Item Option 1, Option 2, etc. Whether or not it includes "Badge Name: " is something I can solve for in other ways.

Thanks for any support!

This seems like a really complicated scenario you’re trying to make, perhaps exporting the blueprint might help others investigate further and answer your question.

At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826

Uploading it here will look like this:

blueprint.json (119.3 KB)

2 Likes

Happy to do that–it’s one branch of a rather large scenario, so I’ll highlight where it is because the blueprint is huge. I’m sure there are some other efficiencies that could be found :slight_smile:

//Actually, let me review that blueprint to make sure there’s no stripe API keys in there :slight_smile:

Oof. Kind of a lot to scrub in that blueprint.
Here’s the webhook that’s incoming, that’s been redacted. It may help.
Untitled 2.json (8.5 KB)

1 Like

Hi @Alex37

You can easily solve this by using an aggregator after the iterator. Specify the “Target structure type” based on the Airtable Create a Record, allowing you to appropriately map the data.

MSquare Support
Visit us here
Youtube Channel

2 Likes