web
You’re offline. This is a read only version of the page.
close
Skip to main content
Navigate to Microsoft.com
Power Platform Community
  • Cancel
    • Search

    Notifications

    Announcements

    Welcome to the Power Platform Communities
    Season of Giving Solutions is Here!
    Explore Copilot Studio Forums, Blogs & Galleries!
    News and Announcements icon
    Community site session details

    Community site session details

    Session Id :
    previous next
    Season of Giving Solutions is Here!
    close
    Power Platform Community / Gallery / Power Automate Cookbook / Renaming files in SharePoin...

    Renaming files in SharePoint after extracting a field with document processing/invoice processing

    Views (2346)
    LikeLike (3) ShareShare
    ReportReport
    plarrue Profile Picture Posted by plarrue Moderator

    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)

     

    when-a-file-is-created(bis).png

     

     

     

    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

     

    get-file-content(bis).png

     

     

    3.Select + New step and select Extract information from invoices

    Fill in the Invoice file and select File Content from the dynamic content list

     

    extract-information-from-invoices(bis).png

     

     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

     

    ID.png

     

    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)

     

    invoiceID.png

     

    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

    Sample data to do document processing

    SharePoint REST API

    Thumbnail.png
    RenamingfilesinSh...

    Categories:

    AI Builder topics

    Comments

    Comment on this blog post
    You don't have the appropriate permissions.
    • thuthuy Profile Picture thuthuy
      Posted at
      Renaming files in SharePoint after extracting a field with document processing/invoice processing

       

      Like (0)
      ReportReport

    News and Announcements

    Welcome to the Power Platform Communities
    Season of Giving Solutions is Here!
    Explore Copilot Studio Forums, Blogs & Galleries!

    Leaderboard

    Top community members by points

    #1
    WarrenBelz Profile Picture

    WarrenBelz 153,084 Most Valuable Professional

    #2
    RandyHayes Profile Picture

    RandyHayes 76,297 Super User 2024 Season 1

    #3
    Pstork1 Profile Picture

    Pstork1 68,717 Most Valuable Professional

    Leaderboard
    • Power Platform overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Copilot Studio

    © Microsoft
    • Follow Power Platform
    • Manage Cookies
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices Consumer Health Privacy
  • Messages
    • Profile
    • Messages
    • My activity
    • Sign out