Zapier Action Tutorial
Setting up your first FormX data extraction workflow on Zapier.
When to use
If you wish to import files from a third party app (e.g. Google Drive, One Drive, Dropbox) and send it automatically to FormX for data extraction, use the FormX Action App.
Get it here: Zapier FormX App invitation link
Prerequisite
- Create a FormX extractor. In this tutorial, we are going to use the FormX New Invoice Model extractor.
- Prepare a Google Spreadsheet with all columns well defined. Get started with this template.
- This tutorial assumes you have basic understanding of how Zapier works.
Outcome
When the Zapier app is set up properly, you will have an automated workflow that listens to any file added to a Google Drive folder, send it to FormX for extraction, and print the extraction result on a Google Spreadsheet.
Step 1: Create a FormX extractor
Log in to your FormX account and create a new extractor. This extractor allow you to extract document data of the type you choose like invoice, resume, etc. In this example, we are going to use the invoice extractor.
Step 2: Add the Google Drive Trigger app
In your Zapier workflow, add a Google Drive trigger app. This app will listen for new files or file changes in your Google Drive.
Configure the app with your Google Drive account credentials and select the folder or file you want to monitor.
Step 3: Add the FormX Action app
Next, add the FormX action app to your workflow.
Depending on the files to process, similar to what the FormX API offers, there are modes you can select:
- Extract (Sync): Extract document and get the data instantly. Perfect for small or one pager file.
- Extract (Async): Extract document and have it processed in the background. Get the data via the FormX trigger app or Get Extraction result block. Suggested for larger files (e.g. multi-pages file)
If you are unsure about which to use, try out Extract (Sync) first.
Step 4: Connect to your FormX Extractor
Next, go to the Account tab and configure the app with your FormX credentials:
- Access token: Get it in the API tab of your extractor
- Extractor or Workspace: Select Extractor
- Extractor id / workspace id: Enter the extractor id, get it in the API tab of your extractor.
Step 5: Configure the FormX action app
Now, go to the Action tab and configure the FormX action app.
- File: In this example, we are getting the file from Google Drive. Therefore, in the dropdown, select File from the Google Drive app.
- FormX response: Two options are provided - transformed response and raw response.
- Zapier-friendly response: It's provided for a simpler Zapier integration set up. If you are always uploading just one single file, especially the file contains line items, use transformed response.
- Raw response: If you need more control over the integration, select raw response. Please note that you may need to add additional Zapier apps to break down or format the raw response before sending it to a spreadsheet (or any destination).
- Advanced extraction options: Those options are a direct reflection of what the FormX API supports. Check out our API doc for more details.
Step 6: Write the extracted data to a Google spreadsheet
Now, we are ready to print the extraction result to a Google Spreadsheet.
Search and add a Google Sheet step.
Depending on your file extraction pipeline, select the event that best works for you. In our example, as we are processing invoices and invoices usually contain multiple line items, we'll select event 'Create Multiple Spreadsheet Row'
Once you've provided the details of the Google Spreadsheet, Zapier will fetch the header of your spreadsheet automatically and you may start working on the data mapping.
Select the respective FormX data field to add to a Google Spreadsheet column.
That's it. You are good to go. Test your Zap as per Zapier instructions.
(Bonus) Step 7: Handle extraction error
The steps we've covered so far will perfectly handle successful extraction result. However, you may wonder what happened if there's a FormX extraction error.
Depending how you'd like to handle error results, here's the 2 suggested ways to do it:
- filter out error result so it'll never be printed on your spreadsheet.
- handle success & error response separately (print them onto two separate tabs on a spreadsheet.)
Either way requires adding an additional Zapier step. Now add a step between Extract in FormX and Create Mulitple Spra
1. Filter out error result so it'll never be printed on your spreadsheet
Add a Filter by Zapier step. Add this condition - only continue if FormX response's status is ok.
In such way, only successful extraction will be processed.
2. Handle success & error response separately
Add a Path by Zapier step. Once added, you will see path A & path B in your Zap.
You can set up a filter in each path. For example, you can filter successful extraction in path A and error extraction in path B. You will then be able to configure the follow up actions of successfully extractions and error extraction separately.
Updated 5 months ago