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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / when a file is created...
Power Automate
Unanswered

when a file is created in a sharepoint folder, check its file extension - does not work

(0) ShareShare
ReportReport
Posted on by

I want to create a flow that triggers when a file is created in a sharepoint folder and then goes to a condition which checks whether the file is a pdf or not. To do this, I need to get the file name with extension and check if it contains .pdf. But for the value of the condition statement, I do not see 'File Name with Extension' as you can see in the screenshot below. How can I achieve this?

 

Untitled.png

Categories:
I have the same question (0)
  • bibhupanigrahi Profile Picture
    240 on at

    Hi @Anonymous, the 'x-ms-filename-encoded' dynamic value does give you the filename with extension, but in an encoded format that you cannot use in the condition. So, you will need to initialize a string variable first with the 'x-ms-filename-encoded' value and then use the variable in the condition (see images below).

     

    get-filename-with-extension-editviewget-filename-with-extension-editviewget-filename-with-extension-runviewget-filename-with-extension-runview

     

    Hope this helps.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard