cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xhudon
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

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
abm
Super User III
Super User III

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 blogPower Automate Video Tutorials
v-alzhan-msft
Community Support
Community Support

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.

xhudon
Frequent Visitor

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?

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

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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (17,668)