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
Does anyone have an idea how to do this ?
Thanks a lot for your help !
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.
Please try it on your side to see if it will work for you.
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.
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)
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...
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?
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!