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

Onedrive file as approval attachemnt.

Hi, I have a flow that should add files from onedrive as an attachment in the approval message.

I have an array variable defined:
obraz.png
this array variable can be successfully added as message attachment and works fine in power automate.

I found out that for approval attachments I have to use "content" instead of "ContentBytes":
obraz.png


but this doesn't seem to work with OneDrive files. because content always returns null in this case, while the version with "ContentBytes" is fine:

obraz.png

 

obraz.png


I think it's because when I download the contents of OneDrive file. there is already a variable "$content" inside. So you can't call the "content" variable twice, but I don't know what expression to write to directly refer to the "content" variable of onedrive file content 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User III
Super User III

Hello Mate,

 

Please set Infer Content type to no and try -

CFernandes_0-1618839910649.png

 

>>I think it's because when I download the contents of OneDrive file. there is already a variable "$content" inside. So you can't call the "content" variable twice, but I don't know what expression to write to directly refer to the "content" variable of onedrive file content 

 

You can also try .

 

outputs('Get_file_content')?['body']['$content']
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

View solution in original post

3 REPLIES 3
CFernandes
Super User III
Super User III

Hello Mate,

 

Please set Infer Content type to no and try -

CFernandes_0-1618839910649.png

 

>>I think it's because when I download the contents of OneDrive file. there is already a variable "$content" inside. So you can't call the "content" variable twice, but I don't know what expression to write to directly refer to the "content" variable of onedrive file content 

 

You can also try .

 

outputs('Get_file_content')?['body']['$content']
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

View solution in original post

Thank you,

 

The first solution did not solve the problem. but the second solved it 😎:


outputs('Get_file_content')?['body']['$content']

obraz.png

obraz.png

 

 

 

 

Wohoo. I am glad that your problem is resolved 😀 

Helpful resources

Announcements
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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (63,563)