web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cloud flow that trunca...
Power Automate
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?

Categories:
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @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
  • Andri03 Profile Picture
    3 on at

    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 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard