Reply
Level: Powered On
Posts: 6
Registered: ‎11-15-2017
Accepted Solution

Retrieving Sharepoint list when modified

Hello,

 

I am trying to create a flow. When an online list in Sharepoint is modified, I want to take that entire list and load it into Azure Data Lake (overwriting the file if it already exists). My current flow is as follows:

 

 

The issue that I am facing is that when this flow is triggered, it only retrieves the rows in the list that were changed, as opposed to the entire list. Is there any way to retrieve the entire list instead of only the rows that were modified?


Accepted Solutions
Level: Powered On
Posts: 6
Registered: ‎11-15-2017

Re: Retrieving Sharepoint list when modified

I was able to get the items in the SharePoint list to near perfection. I will post the Flow here in case anyone in the future needs it.

Capture1.PNG

 

So what I did is that every 5 minutes I "create" a file in Azure Data Lake which overwrites the file if it exists. The content of the files cannot be blank, so I added a newline to the content. Then I use Get Items to retrieve all the items in the SharePoint List. From there, using an Apply to each loop, I append the content of the current row of the Sharepoint list to the Data Lake file (separated by | and ending with a new line after all the content is added). This works to near perfection, with the only caveat being the newline at the beginning of the file, which I eliminate using PowerQuery. 

This is exactly what I needed. If anybody sees a way to make this better, please post so that we can get this to perfection.

View solution in original post


All Replies
Level 8
Posts: 117
Registered: ‎04-21-2017

Re: Retrieving Sharepoint list when modified

[ Edited ]

Hi @vegafl.

 

 

Unfortunately we no have nothing that get the List 'file' in Flow today and no have way to do this using REST too ( the more similar method that i found is this)

 

You can post it as an Idea here. If you post please put here the link to vote.

 

If you preffer you can get all items of list and save as json, to this you should use GetItens action or ever an item are created you save this json in your json of list.

 

If i can help with more fell free to reply here 

 

Best Regards,

 

Gustavo Moraes

Level: Powered On
Posts: 6
Registered: ‎11-15-2017

Re: Retrieving Sharepoint list when modified

I went ahead and created an idea. You can find it here.

Highlighted
Level 8
Posts: 117
Registered: ‎04-21-2017

Re: Retrieving Sharepoint list when modified

Thanks @vegafl.for post and create idea, This helps in growth of Microsoft Flow

 

I vote and post a comment to staff.

 

Please mark this post as solved.

 

Ever you need can post Smiley Happy

 

Best Regards.

 

Gustavo Moraes

 

Community Support Team
Posts: 481
Registered: ‎09-21-2017

Re: Retrieving Sharepoint list when modified

Hi @vegafl,

 

Which data do you want to load into Azure Data Lake from SharePoint list?

Do you want to load the items of SharePoint list into Azure Data Lake or the attachment files of items into Azure Data Lake?

I suppose that you want to load all items of SharePoint list into Azure Data Lake, I agree with @gamoraes’s thought, loading all items of SharePoint list into Azure Data Lake is not supported in Microsoft Flow currently. I would vote the idea that you submitted in Flow Ideas Forum.

 

Besides, if you want to retrieve all items of SharePoint list, please add "Get items" action of SharePoint connector:4.JPG

 

 

 

Best regards,

Kris

Level: Powered On
Posts: 6
Registered: ‎11-15-2017

Re: Retrieving Sharepoint list when modified

I was able to get the items in the SharePoint list to near perfection. I will post the Flow here in case anyone in the future needs it.

Capture1.PNG

 

So what I did is that every 5 minutes I "create" a file in Azure Data Lake which overwrites the file if it exists. The content of the files cannot be blank, so I added a newline to the content. Then I use Get Items to retrieve all the items in the SharePoint List. From there, using an Apply to each loop, I append the content of the current row of the Sharepoint list to the Data Lake file (separated by | and ending with a new line after all the content is added). This works to near perfection, with the only caveat being the newline at the beginning of the file, which I eliminate using PowerQuery. 

This is exactly what I needed. If anybody sees a way to make this better, please post so that we can get this to perfection.