web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Approval Action Flow u...
Power Automate
Suggested Answer

Approval Action Flow unable to display Attachments

(1) ShareShare
ReportReport
Posted on by 6
Hi there,
 

I have built a Power Automate flow that utilizes Microsoft Forms for user submissions, storing the submitted data in a SharePoint List. The form includes two 'Upload File' questions, allowing users to attach files. After submission, the flow sends a confirmation email to the user, including the submitted details and the attached files.

Here is the issue which I am facing, I have successfully retrieved the uploaded attachments in the 'Send an email' action using the varEmailAttachment variable. However, I am encountering an error in the 'Start and wait for an approval' action when attempting to include these attachments.

The error message is: "The request content was invalid and could not be deserialized: 'Could not find member 'contentBytes' on object of type 'ApprovalsConnectorFileAttachment'. Path 'attachments[0].contentBytes', line 1, position 1283.'"

Appreciate the kind assistance and advice on this.

 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    I apologize as its late for me or early for like Europe lol. I believe you are handling the attachments incorrectly.
     
    I am a bit confused as I do not see any send emails, nor do I see any Approvals etc.
     
    You said these are problem / not problem areas but I do not se them.
     
    1. However, you are NOT required to use Base64 and I would not do that, just put the content.
    2. Also I would not use that varFiles thing you are doing, I would simply grab the json(questionanswer) and loop through that.
     
    Can you you please share your email (which makes sense sort of why you are using base64) but in SharePOint its not required, nor is it required and can cause problems in your Start Approval.
     
     
  • DA-08040337-0 Profile Picture
    6 on at
    Apologies on this, please refer the below screenshot for the Send an Email and Approval action.
    1) I have replaced the base64 into Get_File_Content. The error still persists
    2) For your suggestion  "I would not use that varFiles thing you are doing, I would simply grab the json(questionanswer) and loop through that."..Could you guide me this?
     
     
     
  • Suggested answer
    Ellis Karim Profile Picture
    12,059 Super User 2026 Season 1 on at
     
    When you are sending attachments with the Approvals action, the attachments array needs to use the "content" property, not "contentBytes":
     
    Here is closer view of the append to array action. The content requires the following  specific format if it is going to be used as an attachment in an approval action.
     
     
    Use two arrays, one for email attachments (varEmailAttachments), and one for the Approvals action (varApprovalsAttachments).
     
     
     

    Ellis Karim Ellis Karim
    Blog | LinkedIn | Bluesky

     
  • DA-08040337-0 Profile Picture
    6 on at
    Hi Ellis,
     
    Appreciate on the assist on this. Shall I add "Append to array variable - Approval" action like this or do i need to add the action another way?
     
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Here is what you do.
     
    Steps
     
    1. Trigger
    2. Get Response details
    3. Create your Array
     
    4. Add an Apply to each
    ALL NEXT LETTER STEPS ARE INSIDE APPLY TO EACH.
     
    a) you want to type the expression json() -- 
    and inbetween the () you want to add the Dynamic Question with the Files uploaded in between so mine looks like this
     
    Where the guid just gets filled in when you pick the question
     
    b) Add get file content
    Where in the File you want to type the expression item()?['id']
     
    Remember its an expression not a string
     
    c) add the append array
     
    And for name you use expression item()?['name']
     
    again that an expression not a string as such
     
    Now you are done collecting them.
     
    d) To add them to your Approval
    click to go to advanced mode for attachments
     
    Then in the attachments just put 
     
    Cheers
     
    Please let me know if you have further questions.
     
    If this helps you, please help me by marking as Such and maybe a like also :-)
     
  • MMcCloud Profile Picture
    393 Moderator on at
    @Michael E. Gernaey Your post is correct except for what Ellis Karim said. For some reason the array format for attachments is different between emails and approvals.
     
    Emails : ContentBytes
    Approval : Content

    If your solution isn't working that is the issue.
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Actually no you are incorrect.
     
    To have a solution for both, they need a none base64 option first, if its transposed into base64 initially it wont work for both.
     
    Its not even required for Email either.
     
    The approval just wants the bytes, not base64.
     
    What gets used in email depends on if they are looking at GMail or other mail clients. If they are using OUtlook they do not need base64 at all.
  • DA-08040337-0 Profile Picture
    6 on at
     
    Apologies on this as i forgot to mention in the issue is that in my Microsoft Form, there includes two 'Upload File' questions. 
    That would be the reason why i add "varfiles" instead of json() in Apply to Each action.
     
     
  • MMcCloud Profile Picture
    393 Moderator on at
    @Michael E. Gernaey Not to highjack the post but, what is dictating which form they are coming in? like for example I have a few flows that I am pulling files from SharePoint Document Libraries or a SharePoint list and in that case you have to use:
     
    ContentBytes for Outlook 365 Send an Email action but, for Approvals in the same flow you have to use Content? Is it because of the format being pulled in the first place?
     
    Sorry, that is a belligerent number of questions I just didn't know the difference and I am sure this will be something I run into again.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard