top of page

Create Records from Business Cards Power Automate


In the digital era, it still strikes me as slightly odd that people still pass business cards. While LinkedIn and Twitter are my preferred medium, business cards are quick and easy ways to pass information between people and a lot of companies still collect them at in person events (can’t remember what those are haha) by using incentives of giveaways/prizes. So businesses and people come back from trips with stacks of business cards.

One of my favourite features of last year was the business card scanner now available in D365 Sales. This feature allows users to either scan a card using the Dynamics app for phones or select an image from a computer to create a lead or contact, you can watch my video on this here . This process is still manual as you can only upload and create one at a time, however, using Power Automate, you can automate it and upload on mass.

Firstly, create a folder in OneDrive which is where you will upload all your business cards to, this is so Power Automate can pick them up.

Next, flip over to Power Automate and create a new Flow INSIDE A SOLUTION, this is an important part as we need to use a CDS Current Environment action later. The trigger is going to be OneDrive for Business “When a file is created”. Configure the folder to be the folders location you will be uploading Business Cards to in OneDrive.

The next part we need is the CDS Current Environment Action “Predict” and choose:

Model: BusinessCard Model ImageType: File Content Type (dynamic content from OneDrive Trigger)

Image: File Content (dynamic content from OneDrive Trigger)

The Predict action and the business card model is going to read the image, try and pull out the relevant data and then you can use this as dynamic content when creating records. Next, add a new action and choose “Common Data Service Current Environment” connector. The entity is down to you, Lead or Contact are generally used for Business cards. In my example, i’m building Leads. You can use any of the dynamic content from the Predict action which includes:

  • First Name

  • Last Name

  • Email

  • Mobile

  • Address

  • Company name

Map whichever fields to their relevant dynamic content parts and you can also specify the lead source which might be useful. You do need to specify a Topic and it might be worth putting something like “Lead from Convention” so you can easily review and update once the records are created.

You can also attach the Business Card Image to the record in D365 as there is a field on both Contact and Lead for this. You do have to format it in a specific way for the Business Card to get attached/connected. The field is called, you guessed it, Business Card and you need the dynamic content from the predict action “CleanedImage” and the following text/string “data:image/jpeg;base64,”. You need to put this in a Concat, the formula is below: concat('data:image/jpeg;base64,',string(outputs('Predict')?['body/responsev2/predictionOutput/cleanedImage/base64Encoded']))

Drop a business card into your one drive folder to test.

Ciao for now!

bottom of page