Create a zap using any asynchronous OCR API
Step by step guide for a zap enabling to extract Invoices key information from new files on a Google drive and copy them on a Google sheet.
In this post, we’ll build an ID Document processing system: Id documents that arrive on a Google Drive folder will be automatically extracted, and all the data inserted into a Google Sheet.
The best part: No coding required! It will “just work” and will be completely “hands-free” - all the work will be done automatically! If a Google Sheet is not your desired outcome - there are thousands of apps connected with Zapier, so this tutorial can be easily modified to interact with any other application.
The tools required:
- A Google account.
- A free Zapier account (sign up at Zapier.com)
- A Mindee account with an API key.
Mindee proposes a large set of Asynchronous APIs, among which :
- Invoices & Financial Documents
- Any docTI products
Zapier
Zapier is a no code service that connects different tools with a secure no-code interface.
They call the connections "Zaps". Each Zap has a "trigger" an event that starts the process, and an "action" that occurs after the trigger has fired.
In the case of the Zap we are building, you will need a premium account.
If you are a new user (or if you have a new Zapier account), you'll have free premium access for a week (but your Zap will turn off when the trial ends).
Once you have created a Zapier account, you’ll land at the app dashboard. Click the black "Create” button:
Then Click on Zaps
A workflow builder interface is then displayed, with a COPILOT. You can enter in the copilot chat the following text:
When a new ID Document is received, extract the data using Mindee OCR and then copy the extracted data on a Google Sheet
The Copilot will propose 3 zaps that you can validate by clicking on the “+”:
- Google Drive
- Mindee OCR
- Google Sheet
Let’s Now configure each step !
Step 1 Google Drive
Make sure the Trigger Event is New File in Folder.
Link it to your google account and click on continue.
Configure your Google Drive component :
- Choose My Google Drive (or a shared drive)
- Define your folder. In this example we defined it as “Zapier”
- Here we choose to not include deleted files.
- Add a file on the Google Drive folder. You can use this test file.
Click on Continue, it’s time to choose a test file. Choose the file you just uploaded on your drive.
Step 2 Mindee OCR
First define you Action event and validate “Any Async API” is chosen.
Then connect your Mindee Account.
A popup will open with a form, where you will be asked to:
- Enter your account name
- Enter an API key.
If you do not have a Mindee Account, you can create one on the Mindee platform.
Then create an API Key by following this how to.
Once connected to your Mindee account, click on Continue.
Let’s now configure the Mindee OCR Component:
- Define the API URL: Go on your product page ( International Id) on Mindee platform and click on documentation menu.
- Copy the URL displayed and paste it under Your API URL on Zapier.
- Define the API version ( You can find it in the URL): 2 in our example.
https://api.mindee.net/v1/products/mindee/international_id/v2/predict_async
- Under Your document, choose the option: File(Exists but not shown) and click on Continue.
Click on Continue to test the Mindee OCR component.
You should see the prediction of the document. Click on Continue to finalise your Zap with the extracted data copied on a google sheet row.
Step 3 Google Sheet
We've extracted the data from the Google Drive file- now we want to do something with that attachment.
For the Setup, Select the following:
- Action Event: Create Spreadsheet Row.
Then, connect your Google account to Zapier.
In this example, we'll add a row in a Google Sheet with all the details from the Id document:
First let’s create the google sheet:
On your Drive:
- Create a new Google Sheet: In our Example Zapier extraction.
- Rename the sheet: Ids
- Add as headers the fields you want to extract. You can propose the name your want here, as in a next step we will add a mapping between the payload of Mindee and the columns on the Google sheet. Don’t forget to add the name of the file !
Now, let’s configure the component. In this example we limited the number of fields to be copied to the Google Sheet but the International Id API propose more than 15 fields.
For each column of your file map it to a key from the Mindee payload. Each field can propose several features. By Default choose the value.
The following fields were mapped in the component:
- Document Name
- Document Type
- Given Names
- Birth Date
- Birth Place
- Document Number
Once the mapping is done Click on Continue to complete your test.
You can check your Google Sheet where the row have been added.
That’s it. Now you can name your Zap and publish it for use!
Testing your Zap
Now you can test your Zap by adding another file to the Google drive, and after a few minutes - you’ll see the values appear in your spreadsheet automatically from the Zap.
No coding with Mindee
With just a few minutes of work (and with zero coding), we have build a fully functional KYC processing system - Ids are added to a google Drive and are automatically identified, extracted, and the results are placed in a Google Sheet.
We're very excited about the possible opportunities that no-coding options can bring to the Mindee Community!
Updated 26 days ago