Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

FilenameWithExtension fails to detect extension

(0) ShareShare
ReportReport
Posted on by 13

Hi all,

 

I have a flow that sends a notification when a macro-enabled Excel file (.xlsm) is added to a specific folder. This flow works about 95% of the time without issue. However, on rare occasion, a file with a .xlsm extension will be added and no notification will send. When I check the raw output, I notice that the FilenameWithExtension field fails to detect the file's extension. Any idea why this happens or how to fix it? Thanks!

  • Verified answer
    Mitanshu Profile Picture
    1,635 Super User 2025 Season 1 on at
    Re: FilenameWithExtension fails to detect extension

    What does the FilenameWithExtension field detects?

     

    Can you please try following steps:

    1. Create a compose action step in your flow with expression: endsWith(triggerOutputs()?['headers/x-ms-file-id'],'.xlsm')

    2. Re-submit the flow for a run where macro file was correctly detected

    3. Re-submit the flow for a run where macro file was incorrectly detected

     

    What does this compose ation return for test done in step 2 and test done in step 3? I am expecting true on both occassions... 

     

    --

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492