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

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 

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,705)