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 / AI Model Predict actio...
Power Automate
Unanswered

AI Model Predict action started failing with The API operation 'PredictV2' requires the property 'body/responsev2/predictionOutput/Prediction' to be of type 'Integer' but is of type 'Float'.'

(0) ShareShare
ReportReport
Posted on by 4

My flow with custom AI model was running fine since few days and it started failing suddenly with error The API 'commondataserviceforapps' returned an invalid response for workflow operation 'Predict' of type 'OpenApiConnection'. Error details: 'The API operation 'PredictV2' requires the property 'body/responsev2/prediction Output/Prediction' to be of type 'Integer' but is of type 'Float'.'  
I have checked on the input data and it appears all columns are integer but still it fails with same error.  Even the action was successful in previous runs then output was in decimal, not sure what is affecting this.

 

Can anyone experiencing the same.

Categories:
I have the same question (0)
  • CedrickB Profile Picture
    Microsoft Employee on at

    Can you share a screenshot of your flow so we can get more context to understand the possible cause please?

     

  • RPA_trainer Profile Picture
    4 on at

    I am trying with all columns as 1 just to rule out any data issue.





    RPA_trainer_0-1658335092370.png

     

  • CedrickB Profile Picture
    Microsoft Employee on at

    Apparently you are passing a value to one of the fields of your prediction which is a float (Something like 41.23) instead of an expected integer  (something like 41).

    Check your input parameters, what can do is using a conversion to int for all your parameters.

    See Solved: Convert a float variable to INT - Power Platform Community (microsoft.com)

  • RPA_trainer Profile Picture
    4 on at

    to avoid this I tried to pass 1 to every column and it did worked couple of times but after one day it started to fail again.

  • CedrickB Profile Picture
    Microsoft Employee on at

    Can you send an email to aihelpen@microsoft.com, it looks like we will need a sharing session to investigate.

  • MelMacLondon Profile Picture
    13 on at

    Good morning, I have a similar problem.. sometimes there will be text in the item but sometimes float.

    'The API operation 'PredictV2' requires the property........... ...........  to be of type 'String' but is of type 'Float'.'

    I am happy if the AI detects it as a string (to cater for when someone has entered "n/a" as an example)

    Is there any work around for this?

  • Antrod Profile Picture
    Microsoft Employee on at

    Hi @MelMacLondon ,

     

    Unfortunately, you can't provide a string if it requires a float. If that makes some sense in your business case, you can perhaps turn 'n/a' to a specific float value before calling the predict.

  • MelMacLondon Profile Picture
    13 on at

    Unfortunately, it might not just be N/A - could be a variety of hand written notes, "not Applicable", "couldn't find it", "general comment" .... 

  • Antrod Profile Picture
    Microsoft Employee on at

    Perhaps you can test if the input is of type float and if not, apply the same float value for every string?

     

    Antrod_0-1691409521132.png

     

  • MelMacLondon Profile Picture
    13 on at

    The error is occurring on the actual AI Builder model... I do not get any results out to do any such test. I would be happy with just string values for all

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard