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 Platform Community / Forums / Power Automate / How can I rename an ex...
Power Automate
Unanswered

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

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 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,185 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard