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

Power Automate · Attachment Not Opening

Hello,

 

I'm experiencing a problem where the attachment sent out with the approval notification is not opening. On the flow, I have used the "Get attachments" from SharePoint connector.

 

When the approval request notification is sent out to the approver on email, they are able to open the attachment.

momureithi_0-1597053743975.png

What could be the problem?

 

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Howdy,

 

I think the problem is with with Append Array.

 

It should be in format:

 

{
"Name": @{items('Apply_to_each')?['DisplayName']},
"ContentBytes": @{body('Get_file_content')?['body']}
}

 

CFernandes_0-1597141613519.png

 

Complete solution:

CFernandes_1-1597141684522.png

 

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

10 REPLIES 10
manuelstgomes
Super User II
Super User II

Hi @momureithi 

 

Please check that you're sending the attachment contents when sending the email. If you're doing this can you please share the section of the Power Automate that is failing and the error so that I try to help you?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

CFernandes
Super User III
Super User III

Howdy @momureithi 

 

"Get attachments" will not return the file content, you need to use the SharePoint 'Get File Content" to get the File content, and then pass "File Content" to Send an email action from a high level your Flow should look like below.

 

CFernandes_1-1597060167546.png

 

I hope this helps.

 

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!

 

Howdy @CFernandes,

This is my current set up. Does it look good or should I switch it up to match your illustration?

Please let me know.

 

momureithi_0-1597132158198.png

Howdy @momureithi 

 

The problem with your Power Automate solution is that you are creating the File array incorrectly.

 

The Correct format should be 

 

{
"Name": @{items('Apply_to_each')?['DisplayName']},
"ContentBytes": @{body('Get_file_content')?['body']}
}

 

CFernandes_0-1597134110035.png

 

Complete solution:

untitled-1

 

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!

 

 

Howdy,

 

I think the problem is with with Append Array.

 

It should be in format:

 

{
"Name": @{items('Apply_to_each')?['DisplayName']},
"ContentBytes": @{body('Get_file_content')?['body']}
}

 

CFernandes_0-1597141613519.png

 

Complete solution:

CFernandes_1-1597141684522.png

 

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

Many thanks, @CFernandes! Worked like a charm. 👍

I, however, encountered the error below during the flow run (are you able to establish why?) :

 

momureithi_0-1597147386990.png

Fixed it by encoding the file content to base64 (not sure if it's a recommended approach?) :

 

{
"Name": @{items('Apply_to_each')?['DisplayName']},
"Content": @{base64(body('Get_file_content'))}
}

 

momureithi_1-1597147489773.png

Complete solution:

momureithi_0-1597149258268.png

 

Err.. I assume you stumbled over a known bug. I have stumbled on this before.

 

 Approvals action does not recognize contentbytes and so you need to use the content key to pass the file content. 

 

Untitled.png

Well understood - thank you.

Perfect. If my replied 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.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,257)