More operations then expected in HTML extraction

Hi everyone,

I am building an automation to extract the HTML content from some URLs.

The automation steps are as follows: I add a specific term to Google sheet, then I search for it in the Google results, then I get the list of URLS, I extract the HTML from those URL, I convert it to txt and so on.

Problem is: I expected it to fetch the HTML content once per page, but instead, I’m getting multiple HTML extractions for the same pages. So for example, last time I ran it I had a list of 7 URL but more than 30 operations during the HTML extraction.

I already tried to debug it and broke the automation in chunks to see where it went wrong:

· I hardcoded the URL to get the HTML from and that worked fine: 1 URL in 1 URL out

· I connected my sheet to the HTML module (so URL was not hardcoded this time) and that worked fine: 1 URL in 1 URL out

· I then connected the rest of the automation: searched for the term in Google, added the URLs I got to the spreadsheet, passed it to HTML module, and that where it went wrong: I got 5 URLs, but way more HTML conversions, and I don’t understand why.

How do you think I could prevent it?

Thanks for your help

Hi Elio,

Can you provide a screenshot of your scenario and the module that uses more credits than you expected?

That would really help me, your problem is stated very clear!

1 Like

Hey @Elio1 , could you share a screenshot of your scenario?

1 Like

Hi guys!

thanks for your kind help.

Here are the screenshots. In the second one you can see where it goes wrong. Actually it starts going wrong in the HTTP module but I wanted to take a screenshot with the actual numbers

Thanks again

Based on your screenshot, your Iterator is outputting 4 bundles. Is this what you expected?

Also, your “Search Rows” module outputs a bundle for EACH result for EACH bundle before it. Are you expecting a single result? If not, you should be aggregating those search “result” rows.

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, 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 can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Question: Which is the best aggregator do you think you’ll need for your use-case?

Example

Here is an example of how your scenario could look like:

This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

1 Like

HI!

Thanks!

You pointed me to the right direction :blush:

I added an aggregator and now I have a 1 to 1 ratio. All works fine now. Thanks again for your help!

1 Like

No problem, glad I could help you with “More operations then expected in HTML extraction

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help as newer questions are displayed higher on the forum’s “new” page.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Learn Make

How-Tos

Useful to Know

My Custom AppAbsolutely Free!

Save headaches and operations with these utility modules:

  • Chunk Text
  • Chunk Array
  • Chunk Words
  • Multiple Find & Replace
  • Collection to Array/String List
  • Execute JavaScript
  • Estimate Tokens
  • Calculate Difference Between Two Dates
  • List Upcoming Dates of Day of Week
    and more!

Hope this helps! Let me know if there are any further questions or issues.

@samliew