Renaming files in SharePoint after extracting a field with document processing/invoice processing
Hello,
I am sharing an automated cloud flow setup that can be used to rename files in SharePoint after extracting a field with document processing/invoice processing.
For example, I have a folder in SharePoint with invoices and I want to rename them to {invoice-id}.pdf:
1.Select + New flow > Automated cloud flow
Name your flow and choose the trigger When a file is created (properties only)
Fill in the Site Address, Library Name and Folder
2.Select + New step and select the SharePoint action Get file content
Fill in the Site Address and in File Identifier, select identifier from the dynamic content list
3.Select + New step and select Extract information from invoices
Fill in the Invoice file and select File Content from the dynamic content list
4.Select +New step and select Send an HTTP request to SharePoint
Fill in the Site Address:
Method: POST
URI = _api/web/lists/GetByTitle('<LibraryName>')/items(<DocumentID>)/validateUpdateListItem
Replace <LibraryName> by the name of the Library in your SharePoint
Replace <DocumentID> by ID from the Dynamic content list
Body: Enter the request content in JSON
{
"formValues":[
{
"FieldName": "FileLeafRef",
"FieldValue": "<NewFileNameWithExtension>"
}
]
}
Replace <NewFileNameWithExtension> by Invoice ID from the dynamic content list.
(You can choose the content at your convenience, here we are using Invoice ID as an example)
5.Save and test your flow
The name of the file in SharePoint has been renamed with the name of the Invoice ID
Recommend content
Create a document processing custom model
Invoice processing prebuilt model
Comments
-
Renaming files in SharePoint after extracting a field with document processing/invoice processing
*This post is locked for comments