In this lesson, we'll learn how to use AI Models. We'll review the following scenario: automatically extracting data from the Invoice and putting it into Google Sheets.
Step 1. Set up an AI model.
Zenphi can help you process data from any type of document. This time, we'll review the Invoice Parser.
Invoice Parser - extracts key information from invoices such as invoice number, supplier name, invoice amount, tax amount, invoice date, and due date.
1.1 Create an Invoice Parser and add a sample Invoice.
Upload a sample of the Invoice that you want to process via the "Add new files" button (if you have more examples of the same invoice, upload as many of them as possible to increase the accuracy of the extracted data).
1.2 Select the fields that you want to extract.
Once you upload the file, zenphi will read the data from the document, and display it on the right panel.
Common Invoice Properties
Zenphi will automatically suggest the Common Invoice Properties (like Invoice ID, Total amount, etc.) and find them in your document.
Near each field, you'll also see the Data Format (it can be text, collection, etc.) and Confidence Level (of the data accuracy extracted).
Besides the Common Invoice Properties, zenphi will display the Document Properties - the fields that zenphi read from the uploaded document directly.
Hover over any field in any section and check if the data was extracted correctly. Click on the plus icon near the data field you want to be extracted from the Invoice.
When you add the field to the Output of the AI Model, you have the option to rename the property.
Once you add the needed fields, they will appear in the Selected Fields section.
1.3. Save and Publish
When all the fields are set up, Save & Publish the Invoice Parser to be able to use it in the Flow.
Step 2. Create a Flow.
2.1 Choose a Trigger.
You can receive the Invoices through different channels. In this example, we'll start a Flow from a File Upload to Google Drive.
2.2 Build a Flow
Connect a Run AI Model action to the Flow;
- In the AI Model field choose a model that we created earlier.
- In the Document content to process click on the Token Picker and select File Contents from the Trigger Output.
Connect an Add a Row action to the Flow.
- Create a Google Sheet with the data you want to gather from the Invoice;
- Connect this Google Sheet to zenphi in the Add Row action;
- Map the Values for Google Sheet's columns with the Output data from the Run AI Model action using the Token Picker.
Step 3. Save, Test & Publish
Save the Flow;
Launch a Test Run;
Check if the data moved to a Google Sheet correctly.
Publish the Flow.
Learn about other AI Models in this video.
In the next lesson, we'll automate a complex process together to level up your automation skills to the next level.