Retrieving all JSON Strings of each operation output & save them into 1 file

Hello everyone,

I’m back to learn a little more about make.com … obviously with a problem that I can’t solve despite the existing topics on the subject. Probably my scenario is not the same as the other topics.

Well here is my scenario:

I loop an HTTP request as many times as there is a cursor number that is returned in the response. For this, I created a variable (Get variable) that I feed (Set Variable) with the value of the cursor, and when my request no longer returns a cursor, it activates the path with a condition (cusor=“”) which launches a null HTTP request and stops with a commit.

Just for the info: the HTTP request returns a bundle with an array having several collections. HTTP parse setting is activated (yes).

So far so good, it works. (I’ll pass on the details for the next ones who would like to do the same …)

Let’s move on to the problem: Retrieving the data contained in each collection of each operation.

As you can see, I have a “transform to JSON” module that retrieves on each operation all the arrays that contain all the collections and transforms everything into JSON String.

Then I have an “Array aggregator” configured in this way:

But it doesn’t work! I have no output, or even input for that matter. The scenario stops at the “transform to JSON” module and does nothing after that.

My questions:

  • Why doesn’t it go to the rest of the scenario?
  • How can I retrieve all the Json Strings of all the operations and add them to only 1 .txt file to save this file on airtable afterwards?

I would be grateful for your help!

Thanks

Hi,

I found an alternative on my own.
The problem comes from my router (route number 2) which ends with a commit and therefore does not execute anything after. So I had to remove this part and to fill the request loop here is what I did:

  1. My HTTP request returns me the total number of objects, and I know that my request can only return me 1000 complete objects. So I make a first request to have the total number of objects.
  2. I calculate the number of times I have to loop (with the total number of objects / 1000) in a numeric aggregator (it does not work with a simple set variable - I do not know why)
  3. I transmit the result of the numeric aggregator in the “repeats” field of the repeater module.
  4. Finally I browse, my array aggregator has as source the repeater module, and as aggregated fields: the data of the HTTP response.

There you go, I hope this will be useful to others.

3 Likes