I have a folder in SharePoint. I want PDF files to be renamed when I put them in this folder.
For example, the document is named "342532_Amazon". I want the flow to keep the first six numbers (as the new name) and remove the rest.
How can I do this automatically in a cloud flow?
Thank you for your comments. Unfortunately, I'm only just getting into Power Automate: Can you show me a photo of what the flow should look like?
I would be happy to leave you feedback and a like here 🙂
@Andri03 You can split the file name by the underscore and return the first portion of the string with an expression.
first(split([filename dynamic content],'_'))
The split() expression will return the file name as an array. Since you only want the first portion, wrapping the entire expression in the first() function will only return 342532.
Replace the flilename dynamic content in the expression above with the filename dynamic content from your flow.
You might be interested in this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1