cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Solution Sage
Solution Sage

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

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
Highlighted
Solution Sage
Solution Sage

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

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

Highlighted
Frequent Visitor

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

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

 

Regards,

Kpatel34

 

 

Highlighted
Frequent Visitor

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

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

 

 

Highlighted
Solution Sage
Solution Sage

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

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (4,744)