cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Addding file as attachments to list object

Hi,

So, I have a flow that users can start manually and, as an input parameter, they can select a file. I guess the english name on the trigger would be "On selected object" and Filinnehåll is File content in english.

On selected object.PNG

 

Now I want to add this file as an attachment to the selected object. 

 

Add attachment.PNG

 

How do I get the uploaded filename with file extension so that I can use it as Filnamn (File name in english). I feel as if I'm missing something obvious here. The Flow is more complex than this but since I have the other parts working I removed them from this example.

//Mattias

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Addding file as attachments to list object

Hi @Anonymous ,

Thanks for your feedback.

You can use the expression to get the file name.

I have made a flow for your scenario, please check it for a reference.

The expression in 'Compose' is: triggerBody()?['file']?['name']
Capture7.PNG

Best Regards,

Community Support Team _ Zhongys

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

View solution in original post

4 REPLIES 4
Highlighted
Solution Sage
Solution Sage

Re: Addding file as attachments to list object

Hi @Anonymous ,

It seems you want to add attachment to a sharePoint list.

You want to get the file name from the trigger. 

I have made a flow for your scenario, please check it for a reference.

Capture5.PNG

Best Regards,

Community Support Team _ Zhongys

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

 

Highlighted
Anonymous
Not applicable

Re: Addding file as attachments to list object

I don't have my file in SharePoint. What I have is a SharePoint list with list objects. On that object I want to start a Flow (manually). As one of the input parameters on that Flow I want to upload a file from my computer.

User input file.PNG

The file I upload should then be added as an attachment to my list object. I know how to add the attachment but I cant figure out how to get the uploaded file name in Flow. I can't use static file names since I do not know what kind of files my users will upload.

 

Regards

Mattias

Highlighted
Solution Sage
Solution Sage

Re: Addding file as attachments to list object

Hi @Anonymous ,

Thanks for your feedback.

You can use the expression to get the file name.

I have made a flow for your scenario, please check it for a reference.

The expression in 'Compose' is: triggerBody()?['file']?['name']
Capture7.PNG

Best Regards,

Community Support Team _ Zhongys

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

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Addding file as attachments to list object

Thanks, works perfectly Smiley Happy

//Mattias

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,367)