Hello,
I am evaluating how can I use AI Builder to extract information from invoices sent to a specific mailbox. Because I'm not in US I cannot use the "prebuilt" model and I have to use the custom model.
Also because of the model requirements and limitations to maximum 200 collections, I might have to build 2 or even 3 models and depending on the sender to process the information with the right model.
To test the idea, I have created 2 models and using an switch action card I could test which of my two demo email addresses is the sender and on the each case branch I will use the proper model and everything seems fine.
But I want to improve this flow, and instead of using the "Extract information from forms" on each case, I prefer on that switch action just to determine which model should be used and after that call the proper model.
The problem is that I cannot use the dynamic variable in the "AI model" field. If I use the name of the variable that contains the GUID of the model, I cannot save the flow because of an error:
"Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Extract_information_from_forms': The API operation 'PredictV2' is missing required property 'item'.'."
But if I manually enter the same GUID will work, and after closing and re-opening the flow will use the name of the model as if I chosen it from the dropdown list.
So, is there a way to use a model by its ID, using a dynamic value?
Or I have to use the "Extract information from forms" action inside each case branch of the switch?
Kind Regards,
Lucian
Solved! Go to Solution.
Hi @Lucian ,
It seems that you can use that documentation to solve your use case: Use predict action in Power Automate - AI Builder | Microsoft Docs
Hope that helps.
Hi @Lucian ,
It seems that you can use that documentation to solve your use case: Use predict action in Power Automate - AI Builder | Microsoft Docs
Hope that helps.
Hi @Antrod ,
Indeed that did the trick. Thank you very much for pointing me to the right track and the link with the documentation.
Kind Regards,
Lucian
Hi. how you resolve this question?
Hi @TET1 ,
Basically, the instructions in the documentation provided by @Antrod , using the "Predict" action will let you dynamically use the model ID to extract the data.
In my case, I just organize 3 models, so using the "From" field of the email I will "know" which model ID I should use, then instead of using "Extract information from forms" action for each model just to see which will return "something", I use "Predict" action with the proper model ID that is "dynamic".
Kind Regards,
Lucian