cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adanl
New Member

file extension

Hello all,

When I use the Manually trigger a flow button to get a file that should follow a approval process i cannot get the file extension (it gets lost) to save this file in any service (Sharepoint, google drive, gmail, outlook, etc). I found some workarounds when the file is loaded from sharepoint services but they didn't work when i get the file from "manually trigger a flow button". Does anyone know how to solve this?

 

 

Captura6.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

The o365dude has a solution posted here:

https://www.o365dude.com/2017/10/15/new-flow-button-inputs-available/

Basically anywhere you need the file name (which is what I needed) of a Manual Triggered Flow Button, use this expression:

string(triggerBody()?['file']?['name'])
 
I have not tested replacing 'name' with 'extention', but if you can't, I'm sure you can get creative to extract the extention from the name string...

View solution in original post

5 REPLIES 5
v-yuazh-msft
Community Support
Community Support

Hi @ adanl,

 

Could you please share a full screenshot with details of the configuration of your flow?

Have you add a text with the file name in the "Manually trigger a flow"?

 

What are you want to do with the file extension?

 

If you use the trigger "Manually trigger a flow" in your flow, you need to enter the file name with expression manually after you choose the file, please refer to screenshot below:

Capture.PNG

 

If you would like the "manually trigger a flow" trigger could return the file name automatically without enter the file name manually,

I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

 

 

 

Regards,
Alice Zhang

Thank you Alice!

The thing is that the name of the file is created and saved into googledrive and sharepoint depending on other variables (date + projectname + id, example: "20180323 Bridge Construction A34.pdf"), so what i need is to preserve the original extension of the file without asking explicit the file extension to the user. Can you help me with this? I've tried to put directly the name of the file attached as a name but i loose the extension. The extension seems to have to be added explicit.

 

Captura3.PNGcaptura1.PNGcaptura2.PNG

 

 

Another question is why when i run my flow from the mobile i cannot upload other files than images (pdf, docx, etc). From PC i can upload any file. Is it restricted for some reason on mobiles?

 

 

 

 

 
Anonymous
Not applicable

The o365dude has a solution posted here:

https://www.o365dude.com/2017/10/15/new-flow-button-inputs-available/

Basically anywhere you need the file name (which is what I needed) of a Manual Triggered Flow Button, use this expression:

string(triggerBody()?['file']?['name'])
 
I have not tested replacing 'name' with 'extention', but if you can't, I'm sure you can get creative to extract the extention from the name string...

View solution in original post

JSteige this was exactly what i needed. It worked excellent

Thank you so much!

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (3,221)