OCR and Image Upload with PowerApps
They say that change is the only constant. When it comes to PowerApps, it seems like new features are added at lightning speed. Today I’m going to talk about two of the most recently added PowerApps features: The JSON Function and AI Builder Capability.
PowerApps JSON Function
Let’s start with the new JSON function. This is one that many of us have been waiting for. This new capability is going to make interacting with images and data in PowerApps so much easier. With a simple formula you can convert an image file in PowerApps to JSON like so:
And Bam! Flow can easily understand, parse the data and take action for you! For more info on the JSON function check out the PowerApps blog: https://powerapps.microsoft.com/en-us/blog/json-for-canvas-apps/
The AI Builder functionality lets you easily take advantage of powerful Cognitive Services functionality with minimal configuration required. This is slowly rolling out as a preview feature so you’ll start to see it pop up in your PowerApps soon.
If you click Insert you’ll see a new option for AI Builder
There are three options to choose from: Business Card Reader, Form Processor and Object Detector. The Business Card Reader is ready to go out of the box. The Form Processor and Object Detector require you to set up and train a model before you can get started.
For this blog, I’m going to focus on the Business Card Reader because this is something a lot of people have had to do manually. You might recall I had a blog post that showed how to use Flow and an Azure Function using Cognitive Services to OCR and import business cards: https://www.sharepointsiren.com/2018/08/fun-with-flow-business-card-importer/
Business Card Reader
Using the Business Card Read is super simple. Just insert the control and it works, simple as that. The only thing you need to do is tell it what to do with the data it scans. If you want to add it to a database for example, just use your Patch statement and map your fields to the corresponding BusinessCardReader Control values like so:
This is just skimming the surface of what you can do with the new JSON and AI Builder capabilities. I did a video which shows a specific use case for the two tools. In this video, I show how you can OCR a business card with the new importer control, add that to a database and use the JSON and a Flow to easily upload the business card image to a SharePoint document library!