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 / Power Automate Flow Er...
Power Automate
Unanswered

Power Automate Flow Error: Analyze Document Action Expects Body as Object, Not String

(1) ShareShare
ReportReport
Posted on by

Hello Power Automate Community,

I'm encountering an unexpected issue with my flow that was previously running without any problems. My flow uses the Analyze Document for Prebuilt or Custom models (v4.x API) action to process PDFs, but it now fails with the following error:

Error:
Action 'Analyze_Document_for_Prebuilt_or_Custom_models_(v4.x_API)' failed:
The API 'formrecognizer' returned an invalid response for workflow operation 'Analyze_Document_for_Prebuilt_or_Custom_models_(v4.x_API)' of type 'OpenApiConnection'.
Details: The API operation 'AnalyzeDocumentV40' requires the property 'body' to be of type 'Object' but is of type 'String'.

Flow Overview:

  • Trigger: Recurrence
  • Action 1: List files in a root folder
  • Action 2: Filter for PDFs
  • Action 3: For each PDF file:
    • Extract JobID from filename
    • Retrieve corresponding case data
    • Get Content from PDF
    • Analyze Document using Form Recognizer v4.x

JSON Snippet Being Passed:

Here's the JSON being used in the Analyze Document action:

 
json
{
"$content-type": "application/pdf",
"$content": "@{body('Get_Content_from_PDF')}"
}

Additional Troubleshooting:

To isolate the issue, I also tried using the file path from the filtered array as the input to the Analyze Document action,

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
    Hi,
     
    I am not able to see the v4 in this environment, but for V3 it expects an object for the data.
     
    Do you share what Property you are setting the string in? open the action and share that.
     

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 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard