How I can make the ChatGPT module run once after all articles are processed

:bullseye: What is your goal?

Making my ChatGPT module run only after all article URLs retrieved with Inoreader have been scraped by Apify.

:thinking: What is the problem & what have you tried?

My scenario is supposed to get article IDs from Inoreader, parse the URLs with Apify, then summarize the articles with ChatGPT, make a document from the summary, then upload that into my Voiceflow Knowledge Base. The problem is, after Inoreader runs once, and retrieves n article URLs, every module after it runs n times, which is very token consuming, and I also want to have 1 document uploaded to the Knowledge Base per execution. How can I get the modules to “wait for” Apify to finish scraping the URLs, and then run once?

I have tried aggregating but it doesn’t work.

:link: Create public scenario page

Hello,

Most likely you used the aggregator with the wrong configuration.

What you need is the Text Aggregator.

Important. Set the Source Module to your Inoreader module. This tells Make where the iteration starts, so the aggregator knows to wait for all bundles before passing a single combined string to ChatGPT. As a result: Inoreader generates n bundles (one per article), Apify scrapes all of them, and the aggregator passes one combined string to ChatGPT.

Take a look at a sample here:

Have a nice day,
Michal