Hello my friends, how are you?
Thanks again. You already helped me once and now I need one last bit of help to finish my work.
With the help of a friend here, I finished a flow within Power Automate that talks to Microsoft Lists and Microsoft Sharepoint.
Now, I've reached the final part, where the flow takes the contents of the attachment (or attachments) that the user includes when they create a new item. And the flow creates a new file in a specific folder in a specific Sharepoint library.
The creation is working perfectly!
But the file extension is lost when it creates the new file.
For example: If the user attaches a file called ASDFGHJKL.pdf and I want the stream to rename it to
FRIEND.pdf
the flow renames only to
FRIEND
without the extension (.pdf) at the end of the file
If the user attaches a file in PDF or PNG or JPEG or whatever, it renames the file correctly but loses the extension.
Can you help me?
Thank you for the patience guys.
I got it with this expression
@Pstork1 ,
Agreed but most posts here want to append at the end of the file name, not the front so this was something I built a while back and works in testing but not sure if there is a more efficient way to do it.
You would need to supply a '.' in front of the Atype or include it when creating the variable. But you should be able to just use outputs('Get_Attachment_(V2)')?['body/name'] for the filename and have it include the extension. You can still add additional information to the front of the new name.
Hi @fabtodton40 ,
I found a flow I had that does this. I create a new variable and then in this set I am setting the variable using this expression split()
There should be a dynamic content field that includes the extension. Simply use that instead of Data Vencimento. I'm not sure what it would be called, but if you look at a recent run you should be able to see it in the output of the SharePoint action.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional