Extract Data from ID Documents - Power Automate AI Builder Use Case
37:07

Extract Data from ID Documents - Power Automate AI Builder Use Case

Anders Jensen

6 chapters7 takeaways14 key terms5 questions

Overview

This video demonstrates how to automate Know Your Customer (KYC) checks using Microsoft Power Automate and AI Builder. It focuses on extracting data from identity documents like passports and driver's licenses, comparing it against customer data stored in an Excel file, and then automatically validating or flagging the documents. The process involves setting up a cloud-based folder to receive new IDs, using AI Builder's 'Extract information from identity documents' model, and configuring Power Automate to retrieve, process, and compare the extracted data, ultimately moving the documents to 'processed' or 'invalid' folders and updating the Excel sheet.

How was this?

Save this permanently with flashcards, quizzes, and AI chat

Chapters

  • KYC checks are crucial in finance, insurance, and banking to validate customer identities.
  • Customer ID data (passports, driver's licenses) needs to be extracted and mapped to customer records.
  • Storing personal data in Excel is not ideal for compliance but is used here for simplicity.
  • The goal is to automate the extraction and validation process using Power Automate and AI Builder.
Understanding the context and limitations of current data handling practices highlights the need for an automated and compliant solution.
Using passport and driver's license samples to extract first name, last name, and date of birth to map into an Excel sheet.
  • Download and extract sample ID documents and a customer data Excel file.
  • Organize files into specific folders: 'ids to send', 'kyc demo' (containing 'ids to check', 'invalid ids', 'processed ids'), and the customer Excel sheet.
  • Place the 'kyc demo' folder structure and Excel file in OneDrive for Business to be accessible by the flow.
  • Keep the 'ids to send' (source IDs) on the local C drive to ensure Power Automate detects them as new files when moved.
Properly organizing and placing files in the correct locations is essential for the Power Automate flow to trigger and function correctly.
Placing the 'kyc demo' folder in the root of OneDrive and the sample IDs on the C drive.
  • AI Builder in Power Automate provides pre-built models for common tasks.
  • The 'Extract information from identity documents' model is used to read data from IDs.
  • The model can identify fields like name, last name, date of birth, and document numbers.
  • It provides confidence scores for the extracted information.
AI Builder significantly simplifies the complex task of reading and understanding data from various identity documents without requiring custom AI training.
Testing the AI model with a passport and a driver's license to see it correctly extract names (Yak Christian, John A Sample) and dates of birth.
  • Create an automated cloud flow triggered when a file is created in the 'ids to check' OneDrive folder.
  • Use the 'Extract information from identity documents' action, providing the file content from the trigger.
  • Extract the file name from the trigger's headers (x-ms-file-name) using an expression, as the dynamic output is not suitable.
  • Process the file name to remove the extension (e.g., '.jpg') to get the customer ID for lookup.
This forms the core automation, initiating the process upon receiving a new ID and extracting key identifiers needed for subsequent steps.
Using a 'Compose' action with an expression to extract the filename '8116-517.jpg' and then splitting it to get the customer ID '8116-517'.
  • Use the 'Get row' action in Excel Online (Business) to find the customer record.
  • Specify the file location, table name ('customers'), and the key column ('customer id').
  • Use the extracted customer ID (from the processed filename) as the key value for the lookup.
  • Handle Excel's specific date format (days since 1899-12-13) by converting it to a standard date format using an expression.
Connecting the extracted ID data with the existing customer database in Excel allows for direct comparison and validation.
Retrieving the row for customer ID '8116-517' and converting the Excel date '43459' into a readable date like '1978-01-06'.
  • Add a 'Condition' action to compare extracted data (first name, last name, DOB) from AI Builder with the data retrieved from Excel.
  • If all fields match, update the 'Validated' column in Excel to 'Yes' and move the file to the 'processed ids' folder.
  • If any field does not match, update the 'Validated' column to 'No' and move the file to the 'invalid ids' folder.
  • Use 'Move or rename file' actions, specifying the source file identifier and the destination path (processed or invalid folder) along with the filename.
This step automates the decision-making process based on data comparison and ensures files are correctly categorized after processing.
Comparing 'Jane Sample' from the ID with 'Jane Sample' from Excel and moving the ID to 'processed ids' if they match, or to 'invalid ids' if they don't.

Key takeaways

  1. 1Automating KYC checks with Power Automate and AI Builder can significantly improve efficiency and accuracy in financial and insurance sectors.
  2. 2AI Builder's pre-built models, like the one for identity documents, reduce the need for complex custom development.
  3. 3Careful file management and understanding trigger mechanisms (e.g., file creation in specific folders) are crucial for successful Power Automate flows.
  4. 4Extracting and manipulating data using Power Automate expressions is a powerful skill for handling dynamic data, like filenames and specific date formats.
  5. 5Integrating cloud services (OneDrive) with desktop files and applications (Excel) is a common pattern in automation.
  6. 6Conditional logic in Power Automate allows for automated decision-making based on data comparisons.
  7. 7Properly formatting and comparing data types (especially dates) between different systems is essential for accurate validation.

Key terms

Know Your Customer (KYC)Power AutomateAI BuilderExtract information from identity documentsOneDrive for BusinessAutomated cloud flowTriggerActionExpressionGet rowConditionDynamic ContentHeaders (x-ms-file-name)Excel Online

Test your understanding

  1. 1How does AI Builder simplify the process of extracting data from identity documents compared to manual methods?
  2. 2What is the purpose of using separate locations (OneDrive vs. C drive) for the 'kyc demo' folder and the source IDs?
  3. 3Explain the role of Power Automate expressions in extracting and manipulating data like filenames and dates.
  4. 4Describe the conditions under which an ID document would be moved to the 'processed ids' folder versus the 'invalid ids' folder.
  5. 5Why is it important to format the date retrieved from Excel before comparing it with the date extracted by AI Builder?

Turn any lecture into study material

Paste a YouTube URL, PDF, or article. Get flashcards, quizzes, summaries, and AI chat — in seconds.

No credit card required