Templates, Filters & Workflows
Set up extraction around the data your receiving system needs:
- A template defines the fields to extract from a document type.
- A filter classifies incoming documents and selects their templates.
- A workflow connects a file source, extraction settings, and an output destination.
- Document review holds low-confidence results for approval.
Start with one template and test it. Add a filter when you need to handle several document types, then connect the API or a workflow.
Design A Template
Section titled “Design A Template”For an invoice, you might need the supplier, invoice number, date, total, tax, and line items. For a bank statement, you might need the account number, statement period, and transactions. Include the fields your application will use and create a separate template for each document type.
Generate A Starting Template
Section titled “Generate A Starting Template”- Open Studio > Templates and create a template.
- Upload a representative document and select Generate template.
- Review the suggested fields, rename them for your integration, and remove any you do not need.
- Check the field types and line-item structure, then save and test with Quick Run.
Name And Structure Fields
Section titled “Name And Structure Fields”Use specific, stable names such as invoiceNumber, invoiceDate, and
totalAmount. These names appear in the API response, so choose them with your
receiving system in mind.
Use a single field for one value and an array or table for repeated rows.
For example, a lineItems array with description, quantity, and amount
can hold invoices with different numbers of lines.
Add Descriptions And Rules Where Needed
Section titled “Add Descriptions And Rules Where Needed”Set the data type first, then add a description if the field needs context.
For invoiceNumber, a useful description is: “The supplier’s invoice
identifier, usually labelled Invoice No.”
Use rules for specific formatting or calculation instructions, such as a required date format. Test the result against your application before relying on it. Start with the field name and type; add instructions where your test files show they are needed.
Field Limit
Section titled “Field Limit”A template supports up to 50 field definitions. An object or line-item group counts as one definition, and each nested field also counts.
For example, lineItems with description, quantity, and amount uses four
definitions. Extracting 100 rows still uses those same four definitions.
Test A Template
Section titled “Test A Template”Use Quick Run or Playground with representative files, including multi-page documents, lower-quality scans, and documents with missing optional fields.
Check that:
- values match the source document;
- repeated rows are grouped correctly;
- missing values are handled by your application;
- field names and types match what your receiving system expects.
If the same input can contain different document types, test the filter with mixed files too.
Create A Filter
Section titled “Create A Filter”Use a filter when you want the system to choose templates from the documents it receives. For example, a batch may contain invoices and bank statements, each with its own fields.
- Create and test the templates for those document types.
- Open Studio > Filters and create a filter.
- Add rules that identify each document type and select its template.
- Choose which documents to extract and which to skip.
- Test mixed files in Playground.
In an API request, send filterName with the saved filter’s name. Add
documentSplitting=true when one upload contains multiple documents.
For webhook delivery, cover every extractable template in the filter with an active webhook endpoint. See Webhooks.
Building Workflows
Section titled “Building Workflows”Use a workflow to process files from a connected source and send results to an output destination.
- Connect the input and output providers you want to use.
- Create a workflow and select a tested template or filter.
- Choose the input, output, and any file-handling settings available for that source.
- Enable document review if low-confidence fields need approval before delivery.
- Run sample files and check the output before using it for your regular work.
Monitor the workflow’s status and resolve any items that need attention in the app.
When connecting Google Drive or Google Sheets, choose the Google account that can access your selected folders or spreadsheet and approve the requested permissions. If an existing Drive connection asks you to reconnect, use the same Google account already assigned to that connection.
Document Review
Section titled “Document Review”Enable review when you want a person to check low-confidence extracted values before they reach your receiving system. Set a confidence threshold: an extracted field below that threshold holds the job for approval.
For example, an invoice workflow can hold an uncertain invoice number for a reviewer to check against the document before the result is delivered.
For API jobs, send a numeric documentReview threshold from 1 to 99 on
async creation. Omit it when
review is disabled. Jobs awaiting approval have status review_required.
Complete review in Dashboard > Document Review; the approved result then
becomes available for retrieval and completion notifications.
Connect The API
Section titled “Connect The API”Once your templates and filters produce the expected results, create an API key in the same environment. Use sync extraction for a result in the upload response, or async extraction to save a job ID and retrieve the result later. Add webhooks when your backend should be notified on completion or failure.