Strange loop... I think I am getting crazy. Etsy Listing

I’ve created this tool to create an Etsy Listing. The last module has the role to update 10 pictures to the etsy lisitng just created at the beginning of the worksflow. To retrieve the etsy listing number I’ve appended a single cell to a row.

The worflow works fine, but as as soon the last picture has been updated, it restarts again. He makes a second loop and then it stops. Why? I am not able to undestand. I’ve uploaded a picture.

Hello @Enrico_Pennacchio,

Modules that return multiple bundles act as Iterators, causing all modules that come after them to run once for each bundle.
It looks like that might be happening here.
Whatever your Google Sheets module is creating, it appears to be two bundles and everything that comes after runs for each of those two bundles.

If that’s the case there are at least a couple of ways to deal with it, depending on your needs.

  1. Use a filter after that module to make sure only one of the two bundles is used.
  2. Use an aggreagotr after that module, but then the following modules may need to be updated accordingly.

Hope that makes sense!

1 Like

Sorry Michael, I am quite a newbie
, but I don’t get you. The gsheet module runs just once, it stars to run again once etsy module has finished to upload the 10th pictures. I don’t know why.

Unfortunately, the image is too grainy to get a better sense of what’s going on.
It would be best if you could post your blueprint and/or more detailed images.

Also, there appears to be a lot of repetition, but with time and practice, you should be able to greatly simplify the entire thing.

It appears that one of the modules that come before the first Router is returning multiple bundles. If you look at the white bubble that shows up to the top right of each module, that number show you how many bundles were produced. At the beginning, each module produces 1 bundle. At some point there’s a module that produces 2, that’s the one to look at.

1 Like

Hi Donald, Thank you for your support. I am attaching some pictures.

—> As you can see there is no multiple bundles. Scenario is working fine.

→ This is the end of scenario. Corertly here we have a bundle (10 pictures uploaded to Etsy). Scenario has corretly created an Etsy listing with 10 pictures, and believe me there is a lot of repetion cause you have to first create a listing, then you need a listing id to update pictures.

→ Here the magic happens. Once the Etsy module has finished to upload the 10th pictures, the scenario continues to run randomly starting from some module at the beginning of the workflow. I don’t know why.

The issue appears to be your Google Drive Search for Files/Folders, looks like #13. It is producing two bundles so the module that runs after it, Google Drive Download File (and everything that comes after) runs twice.

1 Like

It’s working… I hope. Thank you very much! I’ll let you know in case.

Every result (item/record) from a search module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.

There are other types of aggregator modules, click the below links to find out more:

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

2 Likes

Again. Now it restarts to Google module (update a row) with no apparent reasons.