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 / Prediction in Flow bet...
Power Automate
Answered

Prediction in Flow between a Form Processing Model and SharePoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I am working on a flow between a Form Processing Model in AI builder and SharePoint! When I use the prediction in the flow for my model I do not get the "request payload" fill in. I need to fill in the "document type" and "document" and I can see that it depends on the model I choose I get different fill ins. So I am wondering if you know how to fix it?  guess it has something to do with my model...

 

Best regards,
Ina

Categories:
  • JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Thanks for posting the question.

     

    Since early February 2020 there is no request payload to fill in the predict action, instead you now specify the Document type (image/jpeg for jpeg images, image/png for png images or application/pdf for pdf files) and the content of the form to analyze on the Document field.

    You can find detailed documentation on how to use your form processing models in Power Automate here: https://docs.microsoft.com/en-us/ai-builder/form-processing-model-in-flow

    You can also quickly get started using the following Power Automate template: https://us.flow.microsoft.com/en-us/galleries/public/templates/da60c101494a4083b292e327f2443/click-a-button-to-read-and-save-information-from-documents-using-ai-builder/

     

    For my knowledge, can you let me know where you have seen instructions referring to request payload?

     

    Let us know if this helps or we can further assist!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @JoeF-MSFT,

    Thank you a lot for the answer!
    I actually tried that but for some reason it doesn't work out if the trigger is "When a File is Created" in a folder (SharePoint), but as soon as I try it with the trigger "Manually Trigger a Flow".

    If I use "When a File is created" as a trigger and then the "Predict" as an action the Flow Checker does not come up with any error or warning but when I test it the run fails for the "Predict" as you can see on the picture below. 

    TestTest

     

    I saw the instructions for the request payload here: https://www.youtube.com/watch?v=2vnKw-w9EUM

  • JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Thanks for the update. When you go to flow edition mode can you expand the Predict action and share a screenshot? As well as copying and pasting the error message in the Predict action?

     

    Your flow should look something like this:

     

    2020-03-03_16-49-52.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @JoeF-MSFT,


    Here you can the the flow:

    Flow1.PNG

    And here you can see the outcome: 

    Flow.PNG

    It looks like the error message is within the "body", so here is a copy of that:
    {
    "error": {
    "code": "0x80040265",
    "message": "{\"operationStatus\":\"Error\",\"error\":{\"type\":\"Error\",\"code\":\"DependencyFailure\",\"message\":\"Failure while calling FormUnderstanding GetAnalyzeOperationObjectAsync.\",\"properties\":{\"BackendErrorCode\":\"InternalServerError\",\"DependencyHttpStatusCode\":\"500\"}}}",
    "innererror": {
    "message": "{\"operationStatus\":\"Error\",\"error\":{\"type\":\"Error\",\"code\":\"DependencyFailure\",\"message\":\"Failure while calling FormUnderstanding GetAnalyzeOperationObjectAsync.\",\"properties\":{\"BackendErrorCode\":\"InternalServerError\",\"DependencyHttpStatusCode\":\"500\"}}}",
    "type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
    "stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary`2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary`2 parameters, Dictionary`2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary`2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
    }
    }
     
    Best regards,
    Ína
  • Verified answer
    JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Thanks @Anonymous.

     

    Do you know the size of the image you are adding to the SharePoint folder that is triggering the flow?

     

    If you take that same image from SharePoint and do a quick test, do you get results?

     

    2020-03-03_19-20-13.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @JoeF-MSFT ,

    There you go - I didn't get any result!

    So what I am doing is that I am using a canvas app to capture an image that then is transferred to a SharePoint list so that it is possible to have an overview of all the captured pictures there. Then the pictures go to the Form Processing Model and that then identifies the key values and delivers either back to the SharePoint list or as a message to Microsoft Teams. 

    The pictures are within the size scope, usually between 17 - 55 KB!

    However, the dimensions are not within the scope so that's probably why the error showed up! Because, when I changed the dimensions I could run the quick test and got a result. So then My question to you is, do you know how I can change the dimensions so that the image from the app is within the scope? (I read that it is possible if you have tablet layout, but I am not sure and can't find where I should change the dimensions if I have a phone layout)

     

    Size.PNG

     

    Best regards,
    Ína

  • JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    How are you capturing the image in the canvas app? With the camera control? And then, how are you transferring it to your SharePoint list?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @JoeF-MSFT ,

     

    Yes, I am using the camera control within the app to capture the image and then I have one button saying "Send to SharePoint" which is then done with a flow. The flow consists of Power App as a trigger, then the action "Convert to Binary Image" and last an action "Create File (SharePoint)"

     

    Best regards,
    Ína

  • JoeF-MSFT Profile Picture
    Microsoft Employee on at

    Hello again @Anonymous,

     

    Currently the camera control image resolution is set to 640x480. You can vote the idea proposal to increase these limits for the team to consider: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Camera-Image-Resolution/idi-p/34977

     

    What you can use today is the Add picture control that will make use of your device camera native resolution. The following blog post explains well how to achieve this: http://www.cleverworkarounds.com/2019/06/08/getting-pics-to-sharepoint-from-powerapps-is-getting-easier/

     

    Hope this helps!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much for the help @JoeF-MSFT!
    I will definitely vote for that 🙂

     

    Best regards,
    Ína

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard