How to resolve 'InvalidTemplate' error in Power Automate for AI Builder text recognition flow?

Qureshi, Shahraiz S 0 Reputation points
2024-07-24T15:12:48.0066667+00:00

I'm experiencing an 'InvalidTemplate' error in a Power Automate flow utilizing AI Builder for text recognition. The error message is: "The template language expression 'body('Predict')['body']['predictions']' cannot be evaluated because property 'body' doesn't exist." The structure seems to reference non-existent properties. I've followed the guide on this page. How can I correctly reference the output from the 'Predict' action to avoid this error? Any guidance is appreciated.

Microsoft Power Platform Training
Microsoft Power Platform Training
Microsoft Power Platform: An integrated set of Microsoft business intelligence services.Training: Instruction to develop new skills.
463 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rakesh Gurram 9,060 Reputation points Microsoft Vendor
    2024-07-25T12:05:13.2566667+00:00

    Hi Qureshi, Shahraiz S,

    Thank you for reaching out to us on the Microsoft Q&A forum.

    Where am I seeing this?
    Learning Path: Improve business performance with AI Builder

    Module: Build a Power Automate flow with AI Builder Text recognition

    Please follow the steps outlined in Unit 3 to create a Dataverse table for storing recognized text. Next, create a flow in Power Automate that triggers AI Builder Text recognition whenever an image is added to your OneDrive. Save the result in the table you created. Afterward, set the folder for Power Automate to monitor for new incoming images as shown:

    1

    We tried it on our end, and it worked perfectly. Please refer to the screenshots below:

    2

    3

    4

    5

    If the issue still persists, please do let us know.

    I hope this information is helpful, please Accept Answer & Upvote so that it would be helpful to community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.