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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / copy and renaming exce...
Power Automate
Answered

copy and renaming excel file in the new files

(0) ShareShare
ReportReport
Posted on by 16

I used a flow to make a folder and include an excel sheet when new info is added. Is there any way to rename the excel sheet and include the folder number in it?

Can someone please help me to make a new flow or modify the existing one.

In the existing one.

Thanks 

Donya_0-1644429562648.png

 

Donya_1-1644429581508.png

 

 

 

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Donya ,

    you can rename a file, but you'll need the 'Send an HTTP request to SharePoint' action to do that. The request should look as below:

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

    Note: all the <...> parts must be replaced

  • Donya Profile Picture
    16 on at

    Thanks @tom_riha 

    , I tried to add it to the existing flow. here is the error : 

    Could you help me with this thanks 

    Donya_1-1644442408432.png

     

    Donya_2-1644442487314.png

     

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Donya ,

    it should be the ItemId provided by the 'Copy file' action, not the numeric ID you assigned to the item.

    And the list name should be just the list name, inside single quotes.

  • Donya Profile Picture
    16 on at

    @tom_riha Sorry I still don't know what to put between <> here is the copy file I want to replace "Template" with "Project" number

    Donya_2-1644443412576.pngDonya_3-1644443431096.png

    Donya_4-1644443456061.png

     

  • Donya Profile Picture
    16 on at

    @tom_riha Sorry I still don't know what to put between <> here is the copy file I want to replace "Template" with "Project" number

    Donya_2-1644443412576.pngDonya_3-1644443431096.png

    Donya_4-1644443456061.png

     

  • Donya Profile Picture
    16 on at

    @tom_riha Sorry I still don't know what to put between <> here is the copy file I want to replace "Template" with "Project" number

    Donya_2-1644443412576.png

    Donya_4-1644443456061.png

     

  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    It should be the other way around

    image.png

    And in the URI you should have .../GetByTitle('LineUps')/items(....

    And in the FieldValue remove the < and >

  • Donya Profile Picture
    16 on at

    Thank you @tom_riha  🙂 

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard