Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Extract charactes from attached file name

(0) ShareShare
ReportReport
Posted on by 4

Hello together,

I'm trying to create a flow which get daily email from a shared outlook mailbox at a specific time and save the attached file in a sharepoint. The attached file name is, for example, 23_05_15_XX.xlsx. I would like to extract 23_05 (YY_MM). I have a problem with extracting the five characters of the attached filed name. If necessary, I will provide you with screenshots.

 

Thank you for your help

 

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Extract charactes from attached file name

    Look into the flow history trigger or create a compose action where you put the dynamic value or formula.

  • LilayLily1 Profile Picture
    4 on at
    Re: Extract charactes from attached file name

    Where can I find it out?

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Extract charactes from attached file name

    What is the value of

    triggerBody()?['Attachments']?[0]?['Name']

  • LilayLily1 Profile Picture
    4 on at
    Re: Extract charactes from attached file name

    Hello, 

    thanks for your answer. I've already tried substring

    substring(triggerBody()?['Attachments']?[0]?['Name'],0,6

    . But I get an error. Power Automate is expecting an array and not an object. 

  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Extract charactes from attached file name

    Hello,

     

    substring or slice should do the work.

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Extract charactes from attached file name

    Hi @LilayLily1 

     

    I would request you to share the required screenshots.

     

    Thanks

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