Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How can i rename with files with invoice No. after extraction my invoice No. from the same file (using AI builder) and saving the invoice number in excel sheet?

Hi, the flow an trying to do is to add my invoices to OneDrive document, then the flow will extract the invoice number from the file (PDF files) which is did and saved it to an excel sheet, then i want the flow to rename the file with the invoice number inside it (but using AI builder its saved in an excel sheet with the invoice number and the original file name in the same row in excel). 


Below, you can view the flow that have tried to do, but it give me an error. the Idea i have is the flow find the file in column 1 in excel then changer the name of the file by the invoice No. in excel. Also is it best to use desktop flow or build in model as below? 4.PNG



Super User
Super User

Hi @alidh36,


The Files array (which you got from Get files in folder) should store the names/locations of the files. So, I would expect that you can just point to the CurrentItem for the File to be renamed. 


In the text to add field you can add your own variables like TheNameOfFile. Can you test it with the %CurrentItem% variable in the loop?



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,884)