web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Renaming a File in Sha...
Power Automate
Answered

Renaming a File in SharePoint Online using Flow

(0) ShareShare
ReportReport
Posted on by 7

Hi guys,

 

I'm trying to automate the process of renaming my invoice files to their respective invoice numbers. 

 

Right now I am working with Raw file identifiers that inputs out each PDF invoice as characters such as 'FDS43242GES14213'.

 

However, I am trying to convert the filename of each invoice into their respective invoice numbers such as `78642`.

 

Right now I am able to retrieve the invoice numbers by running it through AI builder and extracting the invoice number the moment the invoice file is placed into a shared file.

 

I am not able to find a clear action to perform such a function in power automate to be able to automate the mass renaming of all the invoices that i have. 

 

Appreciate the help i can get!

Categories:
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey @kohjx1 !

     

    Try this:

    https://powerusers.microsoft.com/t5/Building-Flows/HELP-Rename-copied-sharepoint-folder/m-p/528626

     

     

    If it does not work with the ' ', try with " "

  • kohjx1 Profile Picture
    7 on at

    Hi Nogueira,

     

    Thank you for your help, i managed to change the filenames by iterating through each file that was dragged into the folder. However, when i ran the process, it shows this error which I'm not sure if it would affect the renaming process when i batch transfer a huge amount of files like 50 and above.

     

    Right now, it works fine with 4 files together, but I'm not sure of how to address this error and it would be a problem if my invoice numbers were mixed up in the process of renaming. 

     

    The error says this:

    A file with the name /sites/Invoice2/Shared Documents/TEST_INVOICE_PROCESSING_FILE_NAME/7278279.pdf already exists.

     

    This is the process flow that i used

     

    This is the 1st 2 process flowThis is the 1st 2 process flow

    2.png

    3.png

    I ran it through my model that extracts the invoice number from each PDF document in the folder and use it for the file name in the folder. But it shows this error when i look through the process log. Otherwise everything else works fine, it successfully converts the individual files to its invoice number, but the process log says it fails which makes me wonder if something is wrong with my process.

     

    Would appreciate any help i could get ! Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard