Hi,
I have a scenario with 3 RSS modules. From each RSS feed, I want to fetch the 5 most recent entries, and then consolidate all of them into one field (for that last step, I’m using a “Get multiple variables” tool module, which i hope is the right one).
It looks like this.
The first module works fine - it runs exactly one operation, that receives 5 bundles as output - as I intend.
The second and third modules should do the same - run one operation, get me 5 bundles with results. Therefore, they are configured like this:
However, once I run the scenario, the second module gets me 5 identical operations (each one returning 5 bundles with identical results from the second RSS surce). And the third module gets me 25 operations, again with 25x the same results from feed number three.
This is how the scenario currently runs.
I tried troubleshooting. If I leave Step 1 “Maximum number of returned items” set to 5, and set Step 2 & 3 “Maximum number of returned items” to 1, it will still run the scenarios 5 and 25 times.
If I set Step 1, 2 and 3 “Maximum number of returned items” to 1, each step will only run once - BUT it will also just return one bundle = one item per feed.
How can I get each module to return me 5 items - but without multiplying the operations?
Thanks for any suggestions!
Leander
Hi @Leander_C_Seidl,
Subsequent modules process each bundle from the preceding module individually. So if you output 5 bundles, the subsequent modules are run 5 times.
So in your case: 1 * 5 * 5, or: 1 operation that outputs 5 bundles, 5 operations that output 5 bundles each, 25 operations.
If you want only one bundle to be passed to the next module, try putting an aggregator inbetween.
Cheers,
Henk
2 Likes
Hello @Leander_C_Seidl,
You can only use Get Multiple Variables if you’ve previously used “Set Variables” or “Set Multiple Variables” somewhere earlier in the Scenario.
As @Henk-Operative mentioned, you need to use aggregators.
RSS feed items, and any module that outputs multiple bundles, act as Iterators, meaning everything that comes after the module runs for EACH bundle produced.
To fix this, you can use an aggregator immediately after it. When you add an aggregator module, you need to specify which module is the source, for which you would select the RSS module.
Use an Array Aggregator after each RSS module to aggregate the 5 results into an array of 5 elements.
Or, use a Text Aggregator to compile some text from all 5 bundles into a single text string. For example, if you wanted to list just the Title of each feed item, one on each line, or all on the same line, each separated by something like a comma.
There are also other kinds of aggregators.
You can sort them in-line, so RSS Module → [Array] Aggregator → RSS Module → [Array] Aggregator → RSS Module → [Array] Aggregator. Any modules beyond this will have access to the output from each of the aggregators only.
Which aggregator you use depends on how you are using the results. What is your end goal? You said consolidate into one field, but what does that look like?
If that will be something like a list of titles with links to each feed item, then Text Aggregator might be a good choice.
3 Likes
Thank you to both of you @Henk-Operative & @Donald_Mitchell - both of your suggestions helped a lot to deepen my understanding of how make.com works in these cases.
@Donald_Mitchell , your approach ended up being the perfect solution - my workflow now looks like this:
The text parser at the end cleans up some unwanted characters and unites everything in one text. This already works nicely!
I have one more question (which to be honest, is more in the nice-to-have category, rather than a must-have). Currently, the Text aggregator module for each RSS feed looks like this, where it combines the Title & Description fields of the feed:
Now ideally, I’d love it to be something like this:
But in the current setup, it of course can’t differentiate the three bundles, and thus it repeats the same content x3. Is there a simple fix to that?
1 Like
The text template in the Text Aggregator will be executed once per each bundle so it has to be parameterized to insert the dynamic text which in your case is the word first, second, third etc.
You can use the increment function to create an integer counter (called i
) between the RSS module and the text aggregator. It should be set to reset after each scenario run. Then in the text template you can put something like
The {{switch(i; 1; "first"; 2; "second"; 3; "third"; 4; "fourth"; 5; "fifth")}}
item in the RSS feed is {{29.title}}{{space}}{{29.description}}
The switch() function will test the iterator value for you and put in the correct piece of text on each iteration.
2 Likes
How do you want your final output to look? Are the feed items from all three feeds going to be in one ordered list where the last will be #15?
Or will these be separate lists?
For the former, it might be easier to just bundle each RSS into it’s own array, then at the end merge the arrays into one, iterate it, then you can use the built-in bundle order position __IMTINDEX__
variable as the first parameter in the switch() function.
Here’s how that would look:
In the Iterator module you’d use the merge() function on the arrays produced by the Array aggregators.
For separate lists, @alex.newpath’s suggestion might be the way to go.
Again, a lot of this depends on what your final output should look like.
2 Likes
You’ll just need at most four modules to process as many RSS feeds dynamically.
As long as the first module produces multiple bundles (like a Google Sheets “Search Rows” module),
Then you don’t have to keep duplicating the RSS+Aggregator pair for each feed.
I have also talked about it here previously, Filter RSS entry with multiple keywords and "deduplicate" entries - #4 by samliew
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
1 Like