Showing results for 
Search instead for 
Did you mean: 

powerapps computer vision connector


Does anyone have a working example of using the Computer Vision API connector in PowerApps with the camera image control? I'm aware it's in preview, but presumably there's a reasonable use case for preview...


I have used Flow to achieve what I'm trying to achieve, I'm looking for an example that does not involve Flow or a custom connector.  If I have to use Flow or a custom connector then it seems the PowerApps connector is a bit redundant? at least a bit limited as far as the Camera control is concerned...


Kind regards,



Community Support
Community Support

Hi @RusselThomas,


Could you please share a bit more about your scenario?

Do you want to analyze the image captured via Camera control using the Computer Vision API connector within your app?


I have made a test on my side, please take a try with the following workaround:4.JPG



Add a Camera control, Button control and a Gallery control within the screen. In addition, add the Computer Vision API connector as a data source within your app.


Set the OnSelect property of the Button control to following formula:

ClearCollect(ImageCollection,ComputerVisionAPI.AnalyzeImage("Image Content",{language:"en",visualFeatures:Camera1.Photo}))

Note: The Camera1 represents the Camera control within my screen. Using a collection to store the result the ComputerVisionAPI.AnalyzeImage function returns.


Set the Items property of the Gallery control to following formula:


More details about the Computer Vision API connector, please check the following article:

Computer Vision API connector


Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Kris, this is precisely the use case 🙂


I was battling to find out where to put the image content, and in what format - what I read about visualfeatures didn't really make me think it should go there...


Carlosag's reference






Related Action



(Language)Values: [en, zh]

The service will return recognition results in specified language.





(Visual Feature Options)

A string indicating what visual feature types to return. Multiple values should be comma-separated.





(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.










and it doesn't even register on the MS Docs reference, although it's obviously in the object hierarchy:


I tried using your fomula, but I still get imageformat errors;


ComputerVisionAPI.AnaIyzeImage failed: {

"code": "InvalidlmageFormat",

"requestld": "70526a86-b4e5-4bbc-8ea4-0748c775cb2a",

"message": "Input data IS not a valid image."


Is yours working?


Kind regards,


Hi @RusselThomas,


Just an update -- Please take a try with the following formula on your side:


Please check and see if the following article would help in your scenario:


Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Busy going through the documentation, same error on the updated formula though.

From what I read somewhere yesterday, the vision service expects binary input - from what I can see, the camera puts out base64 encoded jpg....?



Also referenced in the link you sent;


  • For an image URL: Content-Type should be application/json
  • For a binary image data: Content-Type should be application/octet-stream or multipart/form-data

Hi @RusselThomas,


Yes, your are right. The image the the Camera control captured is a base64 Data URI, the format of the base64 Data URI as below:

data:[<media type>][;base64],<data>

Please check the following blog for more details:


If you want to convert a base64 Data URL into an binary data, I afriad that there is no way to achieve your needs in PowerApps currently.


If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:


As an alternative solution, you could consider take a try to pass the image (base64 Data URI) captured via the Camera control within your app to a Microsoft Flow, then within your flow, convert the base64 Data URI into an Binary data.


Please check and see if the following blog would help in your scenario:



Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Kris,


I use the Flow uritobinary expression often as it works well for saving images to SharePoint, but returning the binary to PowerApps and submitting it to the Computer Vision Connector hangs my studio session (using the "Respond to PowerApps" flow action).


Besides this, as I said initially - if I'm going to Flow once, then I may as well process everything (including the CVAPI call) from there and just return the results of the call to PowerApps (which I'm doing now anyway).  This then obviates the need for having the PowerApps CVAPI connector in my app - but then surely I'm missing a trick here somewhere otherwise why do we have the "Image Content" functionality in the connector?



I've also tried sending content from the image upload control and I get the same results, so at this point I'm pretty much back to my original question - can I use the PA Computer Vision connector for sending any image content from PA to the connector, or is it only useful for URL's of images stored somewhere else?  (Something I haven't tested yet, but I'm assuming that at least works)


Kind regards,



Not applicable

@v-xida-msft, I coped your example, but I can see an error , "Invalid Image format", input data is not a valid image". Can you share your insights on this, Thanks

Hi, has anyone actually have a working example of computer vision where you take a picture then have it analyzed and the results presented in a gallery it does not work with the API and when I use flow I get an invalid argument error.

Not applicable

Hello @MJDuane , 


You can try this - 

a. Use Camera control to take a picture

b. Use Azure Blob Connector to upload Camera Image to Blob

c. Create a Computer Vision Cognitive Service on Azure and write your logic using available SDK (I used Python SDK and created a project on Custom Vision for object detection, for example laptop, mouse, etc)

d. Expose your code in point c. as a RESTFul Service

e. Create a custom connector in PowerApps

f. Get the desired response



I hope this helps. In case you need more details, let me know.

Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,353)