cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattias_kallvi
Level: Powered On

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
v-zhos-msft
Level 10

Re: Addding file as attachments to list object

Hi @mattias_kallvi ,

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
v-zhos-msft
Level 10

Re: Addding file as attachments to list object

Hi @mattias_kallvi ,

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.

 

mattias_kallvi
Level: Powered On

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

v-zhos-msft
Level 10

Re: Addding file as attachments to list object

Hi @mattias_kallvi ,

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

mattias_kallvi
Level: Powered On

Re: Addding file as attachments to list object

Thanks, works perfectly Smiley Happy

//Mattias

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 364 members 4,099 guests
Please welcome our newest community members: