cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsmcwhir
Helper I
Helper I

Difference between get file content and get attachment content

Hello, lay user here (non-coder),

 

I have a general question based on an issue I recently had with one of my flows just to help me understand why the solution I tried worked. My basic question is: What is the difference between the actions "Get Attachment Content" and "Get File Content"?

 

Basically, I have an Approvals flow where I send approvals requests based on a sharepoint list form that users fill out and add multiple attachments to. In order to add the attachments, I had appended the attachment content to an array variable and attached that array to the Approval. It was working fine until recently, when I was editing something else in my Flow unrelated, all of a sudden the Approvals began failing due to the attachment not working properly. I finally figured out that sometimes people use "Get File Content" instead of "Get Attachment Content" within the step where the attachments are appended to the array variable, and that solution worked for me.

 

I really just don't understand why or even why it had been working fine up until now with the other action, but the "Get File Content" action also works. Is this some type of bug I'm encountering? Because from what I can tell the "Get Attachment Content" action should have worked also.

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @dsmcwhir ,

 

Having a look at the docs for the connector here, they will both return the binary of the file but the main difference are the input parameters you can pass into the connector to search for the file/attachment.

 

ericcheng_0-1627600316521.png

ericcheng_1-1627600342381.png

 

Get attachment content allows for additional parameters because you can have multiple attachments within the same list item.  The data type for Id is also different for both connectors with one being an integer (List Item Id) and the other being a string (identifier/file path).

 

I guess this just makes it easier and less confusing for the end user depending on what input parameters you have available based on your scenario.

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn 

 

View solution in original post

2 REPLIES 2
eric-cheng
Solution Sage
Solution Sage

Hi @dsmcwhir ,

 

Having a look at the docs for the connector here, they will both return the binary of the file but the main difference are the input parameters you can pass into the connector to search for the file/attachment.

 

ericcheng_0-1627600316521.png

ericcheng_1-1627600342381.png

 

Get attachment content allows for additional parameters because you can have multiple attachments within the same list item.  The data type for Id is also different for both connectors with one being an integer (List Item Id) and the other being a string (identifier/file path).

 

I guess this just makes it easier and less confusing for the end user depending on what input parameters you have available based on your scenario.

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn 

 

View solution in original post

Thank you. So are you essentially saying that the actions accomplish the same thing just could be more/less useful depending on my scenario? In my case, I'm retrieving multiple attachments from an item in a sharepoint list and then attaching them to an approvals request.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,189)