cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kpatel34
Level: Powered On

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
Level 10

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.

 

 

4 REPLIES 4
v-zhos-msft
Level 10

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.

 

 

kpatel34
Level: Powered On

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

 

 

kpatel34
Level: Powered On

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

 

 

v-zhos-msft
Level 10

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 393 members 4,811 guests
Please welcome our newest community members: