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 / Error during Approval ...
Power Automate
Answered

Error during Approval step; InvalidRequestContent

(0) ShareShare
ReportReport
Posted on by 44

Hi all,

 

I've been building flows for my company for a while now.  They have been mostly really simple approval flows for different processes. 

The flow I'm having problems with gets triggered when a new item is created in a Sharepoint List.  It's supposed to get the attachments from the record and start an approval process.  I have this same process working in another flow with no issues.

I use the approach to get contents and attach them to the approval from this post How to get Get Attachment into power automate - Microsoft Tech Community

 

I'm getting this error during the Start and wait for an approval step on my flow:

The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Unexpected character encountered while parsing value: {. Path 'attachments[0].Content', line 1, position 1002.'.'.

 

From the error I gather that there's something going on with the attachments (variable) but I'm not sure where to go from here.

I use the same set of steps to get attachments and content on both flows, but only one of them is working.  I also tried testing with the same attachment on the 2 different flows just in case but same result.  Here are 2 snips of the different flows.  One fails and the other one doesn't.

 

Flow 1 with an errorFlow 1 with an errorFlow 2 with no errorsFlow 2 with no errors

 

 

Any help on how to understand the error itself and troubleshoot it is greatly appreciated

 

**Edit**

Here's a couple of snips on the steps to get attachments, apply to each, start and wait for approval:

Get atttachmentsGet atttachmentsApply to eachApply to eachStart and wait for an approvalStart and wait for an approval

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,226 Most Valuable Professional on at

    Would you show us what the Apply to each and approval configuration looks like in the one that fails?

  • AG-20121725-0 Profile Picture
    44 on at

    Hi, thank you for looking into this.  I've added some snips to the original post.

  • Pstork1 Profile Picture
    69,226 Most Valuable Professional on at

    I'm not sure why the one works with it set up that way.  But in your attachment array it should be 'ContentBytes': not 'Content':.  I've seen that cause the array to fail in the past.

  • AG-20121725-0 Profile Picture
    44 on at

    I tried changing from 'Content' to 'ContentBytes' and now getting a different error.  I found this post suggesting that any attachments in the approval step don't work with 'ContentBytes' only with 'Content' (if I understood correctly) Solved: Power Automate approval with Attachments - Power Platform Community (microsoft.com)

     

    Here are the snips showing the update in the flow and new error:

    Update w/ContentBytesUpdate w/ContentBytesNew errorNew error

     

    I'm going to try and create the flow from scratch again...

  • Pstork1 Profile Picture
    69,226 Most Valuable Professional on at

    You are correct.  AS stated in that thread its a bug.  It should be contentBytes, but something in the approval action was coded wrong.  So we are back to the original problem.  What kinds of files are in the attachments?

  • Verified answer
    AG-20121725-0 Profile Picture
    44 on at

    I ended up re-creating the flow and tried a few different things along the way.  A couple of things I learned from this whole ordeal...

    • I'm not sure if this is what was causing the issue in the first place but the old flow that was failing shows a different setting on the trigger step (even though it's supposed to be the same step 'When an item is created on SP').  I checked a few of my other flows and none of them have this setting.  Not sure if anyone can shed some light on this:
      Left side shows the setting on the old flow that was failingLeft side shows the setting on the old flow that was failing
    • When re-creating the flow I tried using 'ContentBytes' but it still didn't work.  Neither did  'Content'.  For some reason it only worked with 'content' which is how I have it in the other working flow

     

    @Pstork1 - All the attachments are PDF files, but there are no restrictions in case someone tried to submit a different format.  I thought get attachment content step would work for any format, is this not the case?

  • Pstork1 Profile Picture
    69,226 Most Valuable Professional on at

    You are correct it should work for any file type but you never know.  It should definitely work for PDFs.  I've never seen the code on the trigger either.  Maybe that was from an older format.

  • WXu43 Profile Picture
    6 on at

    The same problem happened to me, and it was solved by referring to this link.

     

    Solved: The request content was invalid and could not be d... - Power Platform Community (microsoft.com)

    {
    "name":DisplayName,
    "content": base64(body('Get_attachment_content'))
    }

     

     

     

  • EnochStrok Profile Picture
    57 on at

    Thank you WXu43! This solved my problem after trying the above solutions for about 1 hour!

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard