How to Extract Health Insurance Card Data in Power Automate

You can read a US health insurance card and return the extracted information in Power Automate with Encodian’s AI – Process Health Insurance Card (US) action.

In this tutorial, we’ll build an automated cloud flow that runs when a new health insurance card is added to a SharePoint document library. The flow retrieves the file content, extracts the card data, parses the result, and checks whether the required ID values were returned. If the required values are found, the flow updates the file’s SharePoint properties, and sets the status to Processed. If not, it sets the status to Review Required and sends an email to notify users.  

 

Try Flowr for Free More tutorials

You will learn

Using Flowr actions

Configure the AI – Process Health Insurance Card (US) action in Power Automate

Data processing

Read and process the health insurance card data returned by the action

Downstream automation

Use the extracted card data in subsequent flow actions

Error Handling

Handle cases where required fields are not detected

Prerequisites for this tutorial

  1. A sample US health insurance card for testing. This example uses this sample card.

  2. An active Encodian Flowr subscription or trial
    Not got a Flowr subscription? Start your free Flowr trial today →

Flow structure

When a health insurance card is uploaded to SharePoint, the flow retrieves the file, extracts the card’s data, checks whether any required fields are missing, then updates the file’s properties with the extracted data.

When a file is created

Get file content

Flowr Logos

AI – Process Health Insurance Card (US)

Return extracted card data

Use returned data

Build a Power Automate flow that processes health insurance cards

1

Create a new SharePoint document library

Add new document library

Create a SharePoint document library to store the health insurance cards.

Choose the column type that matches the extracted value. In this example, Effective From A and Effective From B use the Date and Time column type, while the remaining columns use the Single line of text column type. 

2

Create a new automated cloud flow

Create new automated cloud flow

In Power Automate, create a new automated cloud flow.

3

Configure the trigger

When a file is created - SharePoint trigger action configuration

Select the trigger and configure as follows: 

These settings trigger the flow automatically when a file is added to the SharePoint document library.  

4

Get the file content from SharePoint

Get file content - SharePoint configuration

Encodian’s AI – Process Health Insurance Card (US)  action requires the file’s binary content as input. Add SharePoint’s Get file content action to retrieve the File Content property of the SharePoint file. 

5

Process the card with the ‘AI – Process Health Insurance Card (US)’ action

AI - Process Health Insurance Cars (US) action configuration

Add Encodian Flowr’s AI – Process Health Insurance Card (US) action.

This action analyzes the health insurance card and returns the extracted data as JSON. 

6

Compose the result

The Result property returned by AI – Process Health Insurance Card (US) contains the extracted card data as a JSON-formatted string rather than a JSON object. In the raw action output, quotation marks within this string are escaped, so they are treated as part of the string.

To generate a sample schema for the Parse JSON action, we’ll temporarily use a Compose action with the json() function. This converts the JSON-formatted string into a JSON object that can be used as the sample payload.

7

Test the flow and copy the sample JSON

Save the flow, then test it by adding the sample health insurance card to the Health Insurance Cards document library.

Open the run in the flow’s run history, expand the Compose action, and copy the object shown in its Outputs. You will use this sample object to generate the Parse JSON schema.

8

Generate the schema and parse the Result

Return to the flow editor, delete the temporary Compose action, and add a Parse JSON action in its place.

Once you save the flow, the fields defined in the schema can then be selected as dynamic content in subsequent actions.

9

Check that the required card data was extracted

Condition expression to check whether required fields are returned from AI - Process Health Insurance Cars (US)

Add a Condition action to check that both required ID properties contain values. 

The expression checks whether IdNumber.Number or MedicareMedicaidInfo.Id is empty, and the condition compares that result with False.  When both properties contain values, the expression returns False, the Condition evaluates to True, and the flow continues down the True branch. 

10

Update the file properties with the extracted card data

Update file properties - SharePoint configuration

In the True branch of the Condition, add SharePoint’s Update File Properties action. Configure as follows: 

11

Handle cards that require review

Update file properties - SharePoint configuration

In the False branch of the Condition, add the actions that should run when either required ID property is empty. First, add SharePoint’s Update file properties action. Configure as follows:

Send an email (V2) Outlook configuration

Then, add Outlook’s Send an email (V2) action.

12

Test the completed flow

Final flow result using AI - Process Health Insurance card (US) to extract health insurance card data.

The final flow will look like this.

Result property from the AI - Process Health Insurance Card (US) output

The flow retrieves the new file’s content, and passes it to Encodian Flowr’s AI – Process Health Insurance Card (US) action. The action extracts card data and returns it in the Result property. 

ParseJSON output when testing with sample card

The Parse JSON action uses the sample schema to parse the Result value and expose the extracted properties as dynamic content. 

FAQs

?

Can Power Automate extract data from a US health insurance card?

Yes. Encodian’s AI – Process Health Insurance Card (US) action analyzes a health insurance card, and returns recognized information as JSON. You can parse the JSON in Power Automate and use the extracted values in SharePoint, emails, approval flows, databases, or other actions.

?

What happens if a required field is not detected?

If a required field is not detected, it will be absent from the parsed Result JSON string. You can use a Power Automate Condition to check whether the output contains specific values, and define what should happen when none are found.

In this tutorial, the flow sends an email notification and sets the card’s status to Review Required when a required field is not detected.

?

How do I use health insurance card data in Power Automate?

The flow built in this tutorial exposes the card data returned by AI – Process Health Insurance Card (US) as dynamic content. It can then be passed to subsequent Power Automate actions.

?

What information can 'AI - Process Health Insurance Card (US)' extract from a health insurance card?

The available information depends on the card and what the action can recognize. It may include the Member Name, Member ID, Insurer, Gender, and Effective Dates. Review the action’s Result output to see which properties were detected for your card.

Troubleshooting

Below are solutions to common issues you may come across when building your flow.

Still struggling with your flow? Our Support Team would be happy to help!
Click the link below to raise a ticket on our support site.

Contact Support

Next steps

Now that you can read and process health insurance cards in Power Automate, here are some ways you can extend your automation for a more advanced document automation workflow.

  • Validate the extracted values: Add additional condition expressions to check that extracted values are in the required format.
  • Build a Power App upload interface: Allow users to upload pictures of their health insurance cards from a Power App, automatically triggering the flow.

 

Or, consider automating more document processing workflows:

 

More tutorials

Ready to automate health insurance card processing with AI?

Start your free trial of Encodian Flowr for Power Automate to unlock over 250 actions for document automation.