1
votes

I am using the Azure Logic App to upload existing data from Onedrive to Azure File Storage.

In Onedrive more than 300 directories and more than 10000 files are there.

I tried to use the Onedrive list file in folder connector to list all files and directories from that result I can filter out the files. But the Onedrive file connector returns only 20 entries alone.

I could not get all entries. I searched quite a lot but I could not get any resources.

In Azure Logic App there is an option nextLink to get data from next pages but I couldn't get the proper documentation for how to use nextLink.

Does anybody have an idea about how to retrieve data from paginations in Azure Logic App?

2

2 Answers

2
votes

We recently worked on a Logic App, where we get paged data from Azure Activity Logs. There also we have paged responses by default. We used 'Until' loop in Azure Logic Apps till we get the NextLink as undefined.

The following is how the condition in Until look like. (GET_Logs is our azure monitor api connector, you can replace this with your connector to get the file list from OneDrive)

@equals(coalesce(body('Get_Logs')?.nextLink, 'undefined'), 'undefined').

Hope this helps!!

1
votes

Method 1 : 1. Create a variable as string type 1. Use Until connector 2. If no records further "nextLink" will be undefined. 3. Determine using coalesce. By default it is not supporting 4. Add it to to variable

Method 2 : 1. Use inline code connector which gives ability to write code in javascript