cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Get the file content from a referenceAttachment

Hi,

What is the best way to get the file content from a referenceAttachement?

I am trying to get the file content from a referenceAttachement returned by the flow step List the attachments of a post (Group mail).

This is the output from the step :

Untitled.png

The documentation for referenceAttachement state that it should link to a OneDrive/SharePoint document so I tried to use the "OneDrive for enterprises Get file content" flow step to access the content using the ID of the referenceAttachement. It return a 404.

Untitled2.png

I also tried the "SharePoint Get file content" flow step. This one require me to know the SharePoint site and the id of the file... In production, I won't be able to know. But for argument sake, I tested it anyway. I setted the SharePoint site to the site hosting my test file linked by the referenceAttachement and ran the test. It returned a 404.

 

I'm out of idea. If you have a clue about other ways to get the content of the file, please share!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get the file content from a referenceAttachment

Hi @xhudon ,

 

Sorry for I'm afraid that there is no any way could achieve the requirement in Microsoft flow currently.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

5 REPLIES 5
Highlighted
Super User
Super User

Re: Get the file content from a referenceAttachment

Hi @xhudon 

 

Please have a look at this reference

 

https://docs.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http#examples

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Community Support
Community Support

Re: Get the file content from a referenceAttachment

Hi @xhudon ,

 

The get file content action require the file identifier for file in the OneDrive folder, so you couldn't use the attachment id from the Office 365 groups mail in this action to get the file content.

 

Best regards,

Alice   

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

Re: Get the file content from a referenceAttachment

Thank, the doc point toward using the $expand value to get the properties of the item. But this feature is documented as to only work with itemAttachment resource, not referenceAttachment. Furthermore, how would one use $expand with Power Automate?

Highlighted
Frequent Visitor

Re: Get the file content from a referenceAttachment

Hi @v-alzhan-msft,

I figured that those where my best bet. 😕

Do you know any way to get the file using the referenceAttachment id from the Office 365 groups mail?

 

Thanks

Highlighted
Community Support
Community Support

Re: Get the file content from a referenceAttachment

Hi @xhudon ,

 

Sorry for I'm afraid that there is no any way could achieve the requirement in Microsoft flow currently.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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 (7,882)