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

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

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

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

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

Thanks, works perfectly Smiley Happy

//Mattias

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,763)