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.

 

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,725)