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 / 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,179 Super User 2025 Season 2 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

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard