cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Flow to update document file name

Hello,

 

I'm fairly new to Flow and am trying to update a document name.

 

i created a document library where i have a custom template. (excel file), when i open my template the name is Book1.xlsx by default. i don't want my users to change the name manually.I'd like the file name to be "XYZ-DateTime" but cannot figure out how to do it with the options available in flow.

 

I tried several things but nothing works. the latest one is

 

flow.png

 

Does anyone have an idea how to do this ?

 

Thanks a lot for your help !

Cedric

12 REPLIES 12
Community Support
Community Support

Hi Kaddrik,

 

How is your file created? Do your users upload the files to library directly?

 

I am afraid that the flow you created might be not able to meet your needs. I have a flow on my side, please try if it will work for you.

 

The flow is triggered by “When an email is arrived, create file in SharePoint”, then add a Compose action to get the DateTime.

4.PNG

 

Please try it on your side to see if it will work for you.

 

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello Mabel,

 

thanks for your answer.

 

the document is a template set as a content type. the users do not need to upload a document. they just click on "new" and they choose the template.

 

oh !? the compose action...i didn't think about this !! 🙂 I will test and let you know.

 

thanks,

Cedric

Hello !

 

hmm..this doesn't seem to be working.

 

One of my colleagues,may have find a solution to it yesterday. i will try to see with him...

 

Thanks anyway !

Cedric 

Anonymous
Not applicable

Hi Kaddrik

Did you find a solution for this?

I have the exact same need like you...

regards Jesper

Hi Jesper,

 

no sorry, i didn't find a solution for this 😞

 

Regards,

Cedric

New Member

Hello, do you try with the trigger « when a document properties is modify » and update the content properties ?
Anonymous
Not applicable

I'm able to rename a sp doc library file by using REST:

 

select "Send an HTTP request to SharePoint" action,

 

then follow the below article to fill up the header and body of the HTTP REST POST request: (I used option 1 with success)

 

https://sharepoint.stackexchange.com/questions/168014/change-filename-of-existing-file-on-sharepoint...

 

@Anonymous

 

Could you explain how you did it, I am trying to update the file name in a document library with the text in the title field.

 

Thanks,

Anonymous
Not applicable

hi, here is a screenshot of my rename process Flow, this is working brilliantly for me so should work for you as well

 

REST call to rename in FLOW.JPG

 

Anonymous
Not applicable

Hi @Anonymous 

Can you explain what is the ShortFolderName variable and how do you obtain it? Thanks

Anonymous
Not applicable

It's a variable i assigned in previous steps, you can find steps in this link: https://powerusers.microsoft.com/t5/General-Flow-Discussion/setting-local-variables-used-in-specific...

Hi there,

 

So I'm doing this exact thing in my Flow to attempt to update the Filename and extension in a Document Library, however when I run the Flow, it completes successfully but does not affect the filename at all.

 

I tried to also use the "X-RequestDigest" header with a digest value and that didn't change anything either. 

 

Has anything to your knowledge changed regarding using FileLeafRef to update the name of a document?

 

Thanks kindly. 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (3,620)