cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kpatel34
Frequent Visitor

MS flow - how can i combine HTTP service response (fetch max 100 record/request) and create csv/excel file?

Hello MS flow experts,

 

I am trying to call HTTP service to get the training course data...however that service has limitation of 100 records per service request...so i added "Do until" loop to fetch all result set....however when i create csv file it takes only last service call response data.

 

can you please guide me on how can i combine all response data for each HTTP call to create CSV file with all data?

 

Snapshot for MS flow: 

 

MS flow - HTTP call.PNG

 

Output sample:

[
{
"count": 1156,
"next": "https://xyz.com/00000/user-activity/?page=2",
"previous": null,
"results": [
{
"_class": "aggregate_organization_activity",
"id": 6880008,
"user_email": "abc@golmail.com",
"course_id": 2423534,
"course_title": "Change Management",
"course_enroll_date": "2018-10-12T18:10:21Z",
"is_assigned": false,
"assigned_by": null
},
{
"_class": "aggregate_organization_activity",
"id": 6880008,
"user_email": "ab232c@golmail.com",
"course_id": 24242534,
"course_title": "Change Management",
"course_enroll_date": "2019-02-18T21:42:19Z",
"is_assigned": false,
"assigned_by": null
}
]
}
]

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Solution Sage
Solution Sage

Hi @kpatel34 ,

As the Output sample shown, you need set an array variable here.

Then append each item of 'results' into the array.

I have made a test on my side, please take a try with the following workaround:

The expression in the 'Apply to each' is : body('HTTP')?['results']

You should get the ['results'] by youself on your side, then add it as the body into 'Apply to each'.

The expression I used is depend on the Output sample which you have provied.

May be onyour side, you can select the value from the dynamic content.

Capture2.PNGCapture3.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

4 REPLIES 4
v-zhos-msft
Solution Sage
Solution Sage

Hi @kpatel34 ,

As the Output sample shown, you need set an array variable here.

Then append each item of 'results' into the array.

I have made a test on my side, please take a try with the following workaround:

The expression in the 'Apply to each' is : body('HTTP')?['results']

You should get the ['results'] by youself on your side, then add it as the body into 'Apply to each'.

The expression I used is depend on the Output sample which you have provied.

May be onyour side, you can select the value from the dynamic content.

Capture2.PNGCapture3.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

It's work like a charm...Thanks Community Support Team _ Zhongys

 

Regards,

Kpatel34

 

 

Hello Community Support Team _ Zhongys

 

for one of usage activity service call where record count is 13075 ...it failed during "Append to Array Variable" action with max limit 5000 reached.

 

BadRequest. The number of array items in variable 'Results' reached the limit: maximum '5000' and actual '5000'.

 

Is their a way to handle this max limit issue?

 

Regards,

Kpatel34

 

 

Hi @kpatel34 ,

I am afraid that there is no way to achieve your needs in Microsoft Flow currently.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

If there is anything else we can do for you, please feel free to post in the forum.

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (46,461)