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

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
Power 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.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,669)