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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Start and Wait for App...
Power Automate
Unanswered

Start and Wait for Approval with Attachments

(0) ShareShare
ReportReport
Posted on by 41

Hi, I have this flow where I am filtering attachments of type ".pdf" from sharepoint list and want to send these as Attachments with "Start and Wait for Approval" action. However, it is giving error:

The request failed. Error code: 'InvalidRequestContent'. Error Message: '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 308.'.'.

 

I am using a variable and through this I can send filtered attachments in email but somehow "Start and Wait for Approval" is giving error. Need help with this.

 

Regards,

Imran

Categories:
I have the same question (0)
  • jdoss Profile Picture
    458 on at

    You may need to wrap the Name and Content in quotations "" as they need to be strings.

  • imranzafar Profile Picture
    41 on at

    They are in quotes. Please note that I am using same Array variable to send email attachments successfully but somehow it is not working in case of Approval action.

  • jdoss Profile Picture
    458 on at

    I mean the variables also need quotations, like:

    "Name" : "DisplayName",

    "ContentBytes" : "This variable also"

     

  • imranzafar Profile Picture
    41 on at

    Done that as well but still getting below error:

    BadRequest. The request failed. Error code: 'InvalidRequestContent'. Error Message: '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 560.'.'.

  • Verified answer
    jdoss Profile Picture
    458 on at
  • imranzafar Profile Picture
    41 on at

    Hi Jdoss,

     

    This link helped and issue is resolved.

     

    The main issue (for future reference for other users) was that:

     

    1. "Start and wait for Approval" needs "Content" in JSON of Append to Array Variable. Like:

    {
    "Name": @{item()?['DisplayName']},
    "Content": @{outputs('Get_attachment_content_2')?['body']}
    }

     

    2. For Send an Email (V2), we need to include "Contentbytes". Like:

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

     

    Thank you for your help.

    And I hope above points that I have mentioned will help others who may face similar issue in future.

     

    Regards,

    Imran

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard