So a few days ago (Early June 2019), Microsoft started to roll out previews of the AI Builder in PowerApps.

What is AI Builder?

According to the Documentation (and it’s worth bearing in mind, that because this is in preview mode, the documentation may change), AI Builder is:

“A new Power Platform capability that allows you to easily automate processes and predict outcomes to help improve business performance. AI Builder is a turnkey solution that brings the power of Microsoft Artificial Intelligence through a point and click experience. Using AI Builder, you can add intelligence to your apps even if you have no coding or data science skills.”

As it stands right now, this is in preview, and you have to enable it in your PowerApps settings. 

For this quick article I thought I would go through a really simple example of scanning a business card, and then creating a new Lead record in Dynamics 365.

To start with, create a new Canvas app in PowerApps, and use the Phone layout. If you have enabled the AI Builder Preview, then you should see the options in the insert menu

 AI Builder

Choose the Business Card Reader option. This will place the Business Card Reader component on the Screen

The Business Card Reader currently can extract the following if a Business Card is detected:

  • CleanedImage: The image after processing where the business card appears cropped and enhanced from the original image.
  • CompanyName: The company name in the business card, if found.
  • Department: The organization department found in the business card, if found.
  • Email: The contact email found in the business card if any.
  • FirstName: The contact first name in the business card, if found.
  • FullAddress: The contact full address in the business card, if found.
  • FullName: The contact full name in the business card, if found.
  • JobTitle: The contact job title in the business card, if found.
  • LastName: The contact last name in the business card, if found.
  • OriginalImage: The original image before processing.
  • Phone1: The first phone or fax number detected in the business card, if found.
  • Phone2: The second phone or fax number detected in the business card, if found.
  • Phone3: The third phone or fax number detected in the business card, if found.
  • Website: The website detected in the business card, if found.

I decided just to keep things nice and Simple for this demo, so just included the following fields that I would use to create a new Lead in Dynamics 365:

  • Company Name
  • First Name
  • Last Name
  • Email Address

I also included a text field that I would map over to the Description field in Dynamics (I’ll show you later how I configure the Microsoft Flow to concatenate the Company Name – Last name for the Topic on the Lead record.

The fields I added were Text Input fields, so If I needed to change anything on the captured Data I could.

The formula for each field just references the Business Card Reader Component Name and the field, so for Company Name it was


After you have completed these steps, Save and Publish your app. If you’ve followed all the steps above, then you should be able to open the App, Take a photo of a business card and after processing, retrieve the data in to the fields.

So the next stage is to grab that data from our app, and use it to create a new lead.

For this we need to trigger a flow from a button on our screen. I added a Button and called it “Submit to D365”

Once the Button is on the screen, it needs to trigger a flow, which we’ll create next. In the Action Tab of PowerApps, choose Flows, then click Create a new flow. This will open up the Flow designer, which should already have the connector to your PowerApp (Thus inheriting that the button will trigger it)

So in the image above, you’ll see that I have added the “Create a New Record” Action in the flow, and chosen the Org Name and Entity – Lead for this example.

What you’ll also notice is that In the right hand side, there are currently no fields available, but instead have the “Ask In PowerApps” option. This is so that the flow can grab the relevant fields from the App. So If I Choose the Last Name field in the Create a Record Activity then Ask in PowerApps, it will return a holding field for reference:

You’ll also see in the image above that I have concatenated some fields for the Topic.

Once you’ve done this….. Save your Flow and go back to the App. 

In the App, highlight your Submit button, and use the following formula


So this is launching the flow and grabbing the data from the APP

NOTE: Worth noting here, that you’ll need to change the names of the fields on the app to match the names above and in the flow – so add the Createanewrecord_ prefix)

If all looks good, you should have no red crosses, and your formula looks like this

So after that, Save and Publish you App and give it a go!