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 / Create a file with att...
Power Automate
Unanswered

Create a file with attachment extension

(0) ShareShare
ReportReport
Posted on by

Hello,

I couldn't find a solution for this on the forums.  So I have been successful in creating a file of an attachment added in a sharepoint list. But I'm unable to get the attachment created with its right extension.  So the file doesn't open unless I add the extension name. So as a workaround, I requested the team to add .JPG formats.  and What I'm doing is adding [ .jpg ] in flow. 

 

The issue is some attachments are in PNG, or other formats. 

 

Any other ways to achieve this use case? 

 

1.png

 

2.png

 

 

Thank you.

Categories:
I have the same question (0)
  • thjeffri Profile Picture
    Microsoft Employee on at

    Hi radhi-bh,

     

    I don't think there is a property from SharePoint that will give you only the file extension.  However the "Get attachments" action returns the full name of the file, including extension, in the DisplayName property.  So you could use the indexOf() or lastIndexOf() functions to find the position of the dot character, and then use substring() to get the extension

     

    Let me know if this helps,

     

    Tom

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 463 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 427 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard