Filtering Data Without Iterator - Stock Level Comparison Issue**

Description:

I am trying to automate a scenario that creates a task in ClickUp whenever a product reaches its minimum stock level. The data comes from Bling ERP (using an HTTP request) and Google Sheets (which stores the minimum stock levels).

Scenario Setup:

:one: HTTP Request (Bling ERP) → Retrieves a list of all products and their stock levels.

  • Example output:
    {
      "data": [
        { "id": 16435139760, "nome": "Product A", "estoque": { "saldoVirtualTotal": 5 } },
        { "id": 16429068309, "nome": "Product B", "estoque": { "saldoVirtualTotal": 12 } }
      ]
    }
    

:two: Google Sheets - Get Range Values → Retrieves the minimum stock levels for each product.

  • Example output:
    [
      { "ID": 16435139760, "ESTOQUE MÍNIMO": 10 },
      { "ID": 16429068309, "ESTOQUE MÍNIMO": 15 }
    ]
    

:three: Array Aggregator → Groups the stock minimums by product ID.

  • Output structure:
    [
      { "ID": 16435139760, "ESTOQUE MÍNIMO": 10 },
      { "ID": 16429068309, "ESTOQUE MÍNIMO": 15 }
    ]
    

:four: Filter → Should allow only products where saldoVirtualTotal <= ESTOQUE MÍNIMO to proceed to ClickUp.


Issues Encountered:

:white_check_mark: Problem 1: The filter only compares the first product in the dataset.

  • Instead of correctly matching each product’s stock level with its corresponding minimum stock level, the filter repeats the first product’s stock for all comparisons.
  • Filter condition used:
    get(1.Data; 14.Array[].ID).estoque.saldoVirtualTotal <= get(14.Array; 14.Array[].ID).D
    
  • This causes incorrect comparisons and blocks all or allows all products.

:white_check_mark: Problem 2: Infinite Loop Occurs when Using Iterator

  • Initially, I used an Iterator after the HTTP request to split the products, but this caused the scenario to loop indefinitely and repeatedly create duplicate tasks in ClickUp.
  • Removing the Iterator fixes the loop but brings back Problem 1, where the filter only checks the first product.

:white_check_mark: Problem 3: The Filter is Processing More Bundles Than Expected

  • The Filter Inspector shows that it processes 63 bundles (same as the number of products retrieved).
  • However, when filtering, it does not correctly match the stock levels for each individual product.

What I Need Help With:

:one: How can I correctly filter products without using an Iterator, while ensuring that each product’s stock level is correctly matched to its minimum stock level?
:two: Is there a better way to compare stock levels in Make without causing the filter to only use the first product in the dataset?
:three: How can I optimize this scenario to avoid excessive executions (since I am on the free plan with only 1000 operations/month)?

Any help or alternative approach is greatly appreciated! :rocket:


This should clearly explain your issue to the community. Let me know if you need any modifications before posting. Good luck! :blush:

Hey there,

could you please share screenshots of the scenario and how its setup?

From the explanation of your problems alone:

  1. You are mapping the first item, that’s why its the only one getting filtered.
  2. There are no loops in Make. Please share screenshots so we can see what is going on exactly.
  3. Again, please share screenshots so we can see what the incoming data is and how the filter is setup. This way we can better assess what is going on and how we can help improve the scenario.

Hey, thanks for answer me back. I’ve just attached the images. Let me know if it is clear to understand.

Welcome to the Make community!

You have not yet provided sufficient information to demonstrate the problem that would allow us to reproduce the scenario and any error(s).

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Could you please share screenshots of your full scenario? Also include screenshots of any error messages, module settings (fields), relevant filter settings (conditions), and module output bundles. We need to see what you’re working with to give you the best advice.

You can upload images here using the Upload icon in the text editor:

We would appreciate it if you could upload screenshots here instead of linking to them outside of the forum. This allows us to zoom in on the image when clicked, and prevent tracking cookies from third-party websites.

2. Scenario Blueprint

Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!

To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.

You can upload the file here by clicking on this button:

3. Output Bundles of Modules

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved.

Sharing these details will make it easier for others to assist you.

Hello @samliew. I can not upload more than 2 images and 3 links because this is my first post in the community. By the way, i will leave here a google drive link with all images, my scenario blue print and the outputs txt files.

Thanks in advance