Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Cloud flow that truncates file names on SharePoint

(0) ShareShare
ReportReport
Posted on by 3

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?

  • Andri03 Profile Picture
    3 on at
    Re: Cloud flow that truncates file names on SharePoint

    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 🙂

  • creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Re: Cloud flow that truncates file names on SharePoint

    @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

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1