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 / FilenameWithExtension ...
Power Automate
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!

Categories:
I have the same question (0)
  • Verified answer
    Mitanshu Profile Picture
    1,658 Moderator on at

    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard