Skip to main content

Process a document

Send a document to a Document AI processor (e.g. an invoice, form, OCR or custom extractor) and get its text, entities, form fields and tables; each table becomes a Data Table.

Command in the Google Cloud AI toolkit · id ooa.google_ai/documentai_process · 7 inputs (2 required), 6 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
SessionStringNogoogle_aiName of the session opened by Connect.
Processor IDStringYesId of the processor, from its page in the Google Cloud console. It may come from the vault.
FileFileYesPDF, TIFF, GIF, JPEG, PNG, BMP or WEBP file; at most 20 MB.
ProjectStringNoThe project that owns the processor, when it is not the one given to Connect (G6). It may come from the vault.
Processor versionStringNoA processor version id, e.g. pretrained-invoice-v2.0-2023-12-06. Leave empty for the default version.
MIME typeStringNoContent type of the file, e.g. application/pdf. Leave empty to take it from the file name.
First row headersBooleanNotrueUse each table's header row (or first row) as its column names.

Outputs​

OutputTypeWhat it is
textStringAll text of the document.
entitiesTableWhat the processor extracted. Columns: type, text, normalized, confidence.
fieldsDictionaryEntity type to its text, e.g. {"invoice_id": "INV-100", "total_amount": "110.00"}; repeated types become a list.
form_fieldsTableForm fields found on the pages (form parser). Columns: name, value, confidence, page.
tablesListOne Data Table per table found.
page_countNumberNumber of pages processed.