Posts

Showing posts from February, 2019

Microsoft Flow - Renaming Files in SharePoint Online using Flow

So your looking to use Flow and rename some files in SharePoint. Too easy, but wait - there are no actions available to allow a rename? So what's next!? Well here we go, REST API to the rescue! But not so fast, there are some catches. You create a "Sent an HTTP request to SharePoint" action and fill in the properties as follows Site Address = http://yoursite.sharepoint.com/yoursubsite Uri = _api/web/lists/getbytitle('<LIST NAME>')/getItemByStringId('<List Item ID>') Headers = { "X-HTTP-Method" : "PATCH" , "If-Match" : "*" , "Content-Type" : "application/json;odata=verbose" , "Accept" : "application/json;odata=verbose" } Body = {'__metadata': {'type': 'SP.Data.Project_x0020_DocumentsItem'}, 'Title':'test', 'FileLeafRef':'test.bmp'} The above can be created in the activit