Email remains the most common way to receive third-party invoices, but it comes with several drawbacks, including manual data entry from PDFs, the hassle of downloading attachments, and inconsistent layouts that make automated parsing and data extraction difficult. In this article, we’ll explore how to overcome these challenges using AI-powered OCR to extract financial data from invoices received via email, and seamlessly transfer it to Google Sheets with Zapier.
Before we begin, make sure you’ve created a Cradl AI account.
Once you’re logged into Cradl AI, create your first AI model with just a few clicks by cloning the invoice model.
Customise the model to suit your needs by adding or removing fields based on the data you want to extract from your invoices. That's all it takes to create an AI model that understands your invoices!
Got tabular data or line items in your invoices that you also want to extract? No problem - just use the Line Items field. For more information on that, this article goes into detail about data extraction from tables.
There are several ways to import your invoices into Cradl AI for data extraction.
Connecting your mailbox to Cradl AI with a forwarding address is an easy and efficient way to automate your imports. Cradl AI auto-generates an email address you can forward your invoice emails to - any email attachment that arrives at this address will be automatically parsed.
Manually downloading your invoices and uploading them to Cradl AI in bulk is always an option for those who prefer a simple and manual approach. This works particularly well if you only process invoices occasionally.
Zapier can monitor your mailbox (i.e., with Gmail's New Email trigger) for trigger events—such as emails moved to a specific folder or titles containing certain keywords—and send them to the AI tool for processing. If you choose this approach, you want to add Cradl AI's Parse Document or Parse Document With Human-In-The-Loop actions.
In this example, we'll go with the Email forwarding approach.
Test the integration by sending an email with a document attached to the newly generated address. The document will be automatically processed, and you can view the extracted data inside the Validator in Cradl AI.
Now that your AI model is working, we'll connect it with a Google Sheet.
Head over to your Google Drive and create a blank spreadsheet. Add headers that correspond with the fields you want to extract from your documents. In Google Sheets you add headers by simply typing values into the topmost cells:
When you're mapping Cradl AI's extracted data fields to your spreadsheet's headers, you'll notice that you can choose from way more fields than the handful you defined in your spreadsheet's headers.
99% of the time you are looking for those values that are prefixed with Validated Predictions and suffixed with Value, such as Validate Predictions Purchase Date Value, Validate Predictions Total Amount Value, and so on.
Once your Zap is activated, the automation is ready to run:
Clicking Validate triggers the Zap, sending the data directly to your Google Sheet. Within seconds, your spreadsheet will update with the extracted values.
Now that we've successfully extracted data from the invoice, let's ensure we keep the original file organized as well.
First, go to Google Drive and create a new folder to store your invoices.
Return to Zapier and add Google Drive as the third step in your Zap.
Your original invoice PDF should now be securely stored in Google Drive, keeping everything organized!
To run the entire Zap in a live environment, make sure you have published the Zap. Otherwise, it will only work in test mode. Happy Zapping!
If you would like a version of this tutorial that does into more detail, this video has got you covered.
We’ll help get you started with your document automation journey.
Schedule a free demo with our team today!