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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How can I rename an excel file using the flow below?

(0) ShareShare
ReportReport
Posted on by 160

I have this flow that is triggered by a created item in a list. Basically I am creating a new folder and copying and pasting an excel file into the newly created folder. This works just fine but now I would like to rename the excel file with the name of the folder. The name of the folder will change depending on the Project field in a list within the site. How can I do this?

 

alopez222_1-1644360256574.png

 

 

I have the same question (0)
  • tom_riha Profile Picture
    10,179 Most Valuable Professional on at
    Re: How can I rename an excel file using the flow below?

    Hello @alopez222 ,

    you can rename the file with an HTTP request.

    Method: POST
    
    Uri: _api/web/lists/GetByTitle('<LibraryName>')/items(<DocumentID>)/validateUpdateListItem
    
    Body:
    {
     "formValues":[
    	{
    	 "FieldName": "FileLeafRef",
    	 "FieldValue": "<NewFileNameWithExtension>"
    	}
     ]
    }

     

  • alopez222 Profile Picture
    160 on at
    Re: How can I rename an excel file using the flow below?

    While reading the link to the article it says to make the FieldValue equal to a function. This does pop up when I try looking for it. Instead I replaced it with the Project field as seen in picture 2. Unfortunately, this didn't result in what I hoped for. The name of the excel file within the folder isnt the same name as the folder, in this case 0123456.

    alopez222_0-1644507450774.png

    alopez222_1-1644507626765.png

    Results:

    alopez222_4-1644507677997.png

     

    alopez222_3-1644507664486.png

     

     

  • Verified answer
    tom_riha Profile Picture
    10,179 Most Valuable Professional on at
    Re: How can I rename an excel file using the flow below?

    Hello @alopez222 ,

    check the action input and output in the flow run history, it should tell you what value you're trying to update and if the update was successful. And you should add also the file extension to the new name.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard