cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucian
Advocate III
Advocate III

Is it possible to enter a dynamic value for model in "Extract information from forms"

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.

 

AI1.jpg

 

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.

 

AI2.jpg

 

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

1 ACCEPTED SOLUTION

Accepted Solutions
Antrod
Microsoft
Microsoft

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.

View solution in original post

4 REPLIES 4
Antrod
Microsoft
Microsoft

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.

Lucian
Advocate III
Advocate III

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

TET1
New Member

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 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,256)