Can we trigger an API when new files are added to group folder?

Brass Contributor

Hi All,

 

we have an requirement to push files from one of the folder in office365 group to sharepoint on weekly basis.

 

I can acheive above requriement by developing an timer job soltuion which will run weekly once and check office 365 group folder and if there are any files then push the files to sharepoint doc library along with some default tagging.

 

Whether sharepoint webhooks can be used for office 365 groups to get notified when new files are added to office 365 group folder, then I can trigger azure function and complete above requirement.

 

Let me know if this approach is possible and any related articles which can throw some light on this area.

 

Sri

8 Replies

Have you considered a Flow?

If you want to push files weekly then your scheduled jobs approach is more appropriate. Webhooks will be triggered immediately on file/folder added/updated events. I hope you would have came across this article - https://dev.office.com/sharepoint/docs/apis/webhooks/sharepoint-webhooks-using-azure-functions#grab-...

@Salvatore - Nope I have not thought of it. I will explore it.
@Rajesh - Thanks for sharing the link. I was aware of webhooks but did not implement at folder level. I will give a try.
@Salvatore - Thanks for your input.

I explored below two templates
1) Moving files from One drive business to SharePoint Doc Library
2) One SharePoint Doc Library to Other SharePoint Doc Library.

In my requirement, I need to tag some fields in document library after moving files to destination.

Is there any option to tag fields in document library??

@Merwan_Hade - Can you please give your input for udpating field values once we move file to document library in FLOW?

@Salvatore Biscari - I am able to update sharepoint list field value using SharePoint REST API. Below is the screenshot of my HTTP step configuration.

Flow HTTP POST.png