Iterator not creating bundles

Wanting to send an email for each database record found.
But the iterator doesn’t convert the array into bundles.

I’ve gotten myself confused here on how iterators are meant to work. The academy examples didn’t bring me clarity. :slight_smile:

Expectation: About 10 records found in database. This should send 10 emails using data from the database records.

First question… why would the iterator show 1 bundle, instead of the 10 bundles?

Overview: :point_down:

Array Aggregator seems to convert database records into an array::point_down:

Iterator uses the Array Aggregator output::point_down:

But iterator only showing one (1) bundle (as an array of collections?)::point_down:


Second question… do I need the second Array Aggregator to do the looping of emails?

Thank you. It feels like I’m missing one little piece but can’t seem to crack the code. :joy:

You should not aggregate and then re-iterate in the first place if you want to keep them in separate bundles, unless there is some reason that we are not in the know about.

For further assistance, please provide the following:

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. 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
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

1 Like

Thanks @samliew . I can’t give out the bundle data, as it has private data. Instead, here is the bundle before and after.

Structure of the bundles from the database:

Structure of the singular bundle in the iterate step after I use the Array Aggregator:

I’m unclear about your suggestion to not aggregate, then re-iterate. The MySQL tool’s output seems to need translating. Here’s what I see as variable choices for the MySQL tool:

1 Like

@samliew the suggestion you made got me thinking. It helped me simplify this piece. You were right, I didn’t need to aggregate, then re-iterate.

Here’s the solution that works that iterates through the MySQL results and sends an email for each database record retrieved. When there are no database results, the piece in gray doesn’t execute and the flow continues after.

Perfect, thank you!

2 Likes

Hey @Tom_Hudock :wave:

Just wanted to stop by and say that you’ve done a great job figuring out the solution to your problem!

Thanks for sharing your ideas with us and keeping us updated.

Cheers! :meow_party:

1 Like

Thanks @vendy . The community has been a good resource for me that’s helped figure out problems. I’m just trying to add to the collective in a clear way for others. :slight_smile:

2 Likes