
Extract Data from ID Documents - Power Automate AI Builder Use Case
Anders Jensen
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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
Key takeaways
- Automating KYC checks with Power Automate and AI Builder can significantly improve efficiency and accuracy in financial and insurance sectors.
- AI Builder's pre-built models, like the one for identity documents, reduce the need for complex custom development.
- Careful file management and understanding trigger mechanisms (e.g., file creation in specific folders) are crucial for successful Power Automate flows.
- Extracting and manipulating data using Power Automate expressions is a powerful skill for handling dynamic data, like filenames and specific date formats.
- Integrating cloud services (OneDrive) with desktop files and applications (Excel) is a common pattern in automation.
- Conditional logic in Power Automate allows for automated decision-making based on data comparisons.
- Properly formatting and comparing data types (especially dates) between different systems is essential for accurate validation.
Key terms
Test your understanding
- How does AI Builder simplify the process of extracting data from identity documents compared to manual methods?
- What is the purpose of using separate locations (OneDrive vs. C drive) for the 'kyc demo' folder and the source IDs?
- Explain the role of Power Automate expressions in extracting and manipulating data like filenames and dates.
- Describe the conditions under which an ID document would be moved to the 'processed ids' folder versus the 'invalid ids' folder.
- Why is it important to format the date retrieved from Excel before comparing it with the date extracted by AI Builder?