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 Apps / Pass the custom vision...
Power Apps
Answered

Pass the custom vision service an image from powerapps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, I've built an image classifier in the custom vision service that works great. The problem is how on earth do I pass it images from PowerApps. I've tried to use flow and the requirements are a bit bewildering. Do you know if the custom vision options inside powerapps are working, i cant find an example of the syntax required anywhere. current app flow is add a photo of a leaf in the add media control -> leaf photo added to collection - > then who knows, all i want to do is pass to the classifier ? Any help is greatly appreciated happy new year people

 

so a bit of an update - It turns out that its impossible to pass an image from the add media control, after much research the best way to do it is apparently configure a web service and set up a custom connector to trigger it. so far i've got this. the problem comes when i try pass an image file, i get what i think is a http output that flow opens in a new browser window, and ideas how i can parse it to a json schemaflow and powerapps.PNG

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    i should probably say, I dont know if its relevant, the classifier detects disease in tomato leaves
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please share a bit more about your issue?

    Do you want to pass a image file captured via "Add Picture" control to your flow?

    Further, do you want to convert the HTTP output into a JSON format within your flow?

    If you want to pass a image file captured via "Add Picture" control to your flow, please check and see if the following blog or video would help in your scenario:

    http://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/

    https://www.youtube.com/watch?v=mp-8B1fLrqs&feature=youtu.be

     

    In addition, the HTTP output in your flow is actually a JSON data format. In default, the data output format of the HTTP action (including "When a HTTP request is received" trigger) within MS Flow is a JSON format (application/json).

    If you want to convert the HTTP output in your flow into a JSON format, I think it is not necessary.

     

    Best regards,

    Kris

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Morning @v-xida-msft,

     

    Thanks for your reply, I actually solved this myself after much soulsearching and anguish.

     

    I had overlooked the native PowerApps functions for passing an image over to the custom vision service, assuming that they didn't work, when actually they work fine. I used the below formula after setting up the connector.

     

    ClearCollect(PredictionOutcome,CustomVision.PredictImag("c56044c48086xx464595d6f28xxecc596axxb",UploadedImage4.Image))

     

    this passed my added image to the CV service without the need for flow, I think i was distracted by all the talk in the community about the use of compose functions to handle images.

     

    Anyway thanks for your help 

     

    all the best

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Team,

     

    I am trying to use CustomVision through powerapps. i am getting following error, i dont know why.

     

    CustomVision.PredictImage failed: { "error": { "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." } }

     

    I am trying to call a customvision using prediction key.

    Please help!

     

     

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 Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard