English
Mindee
Extracts data from an attachment (invoice, ID document, bank details, certificate) with a Mindee model.
The Mindee node reads the data of an emailed document with a Mindee extraction model: an invoice, an ID document, bank details, an insurance certificate. The extracted fields feed the rest of the workflow (a table, a CRM, a reply).
It works with a Mindee connection created once in Connections. See Mindee.
At a glance
- Type:
mindee.api· version 1 - Category: Data
- Kind: Step — one stage of a run
- Effect: Writes outside (
external_write) — writes outside Loop & Roll; described instead of performed during a test run - Needs a carrier email: No
- Connection: Mindee
- Inputs:
main - Outputs:
main
Connection
This node needs a Mindee connection.
Parameters
connection
Mindee connection — The Mindee connection to use. Create it once in Connections; its key never appears in the workflow.
- Type: Connection (
credential) - Required: Yes
- Default:
""(empty)
action
Action
- Type: One choice (
options) - Required: Yes
- Default:
enqueue - Options:
enqueue— Send an attachment for extraction: Returns a job identifier: read the result after a short wait.result— Get the result: The extracted fields, or “not ready yet” while Mindee is still working.
model
Model — The extraction model configured on the Mindee platform.
- Type: Remote resource (
resourceLocator) - Required: Yes
- Ways to choose: pick from a list, type an ID (
mindee.model) - Listed with the connection in:
connection - Shown when:
actionisenqueue
selection
Attachments to use
- Type: One choice (
options) - Required: Yes
- Default:
all - Options:
all— All attachments: Those of the triggering email, then the files added by earlier steps (a fetched deed, a signed PDF), in that order.first— The first one only: The first attachment, when only one matters.byMime— By file type: By MIME type:application/pdf, or a whole family withimage/*.byName— By file name: By name pattern:*.pdf,invoice-*.
- Shown when:
actionisenqueue
mime
File type — Exact MIME type (application/pdf) or a whole family (image/*). Left empty, no attachment is kept.
- Type: Text (
string) - Required: No
- Default:
""(empty) - 200 characters at most
- Example:
application/pdf - Shown when:
actionisenqueueandselectionisbyMime - Expressions:
{{ }}accepted
namePattern
File name — Simple pattern: * matches anything, ? one character (*.pdf, invoice-*). Case is ignored.
- Type: Text (
string) - Required: No
- Default:
""(empty) - 200 characters at most
- Example:
*.pdf - Shown when:
actionisenqueueandselectionisbyName - Expressions:
{{ }}accepted
rawText
Also return the raw text
- Type: Yes / no (
boolean) - Required: No
- Default:
false - Shown when:
actionisenqueue
jobId
Job — The identifier returned by “Send for extraction”.
- Type: Text (
string) - Required: Yes
- Default:
""(empty) - 100 characters at most
- Example:
{{ data.<step>.jobId }} - Shown when:
actionisresult - Expressions:
{{ }}accepted
Outputs
main— Taken once the Mindee call succeeds, including when the result is not ready yet. An error response from Mindee fails the step instead.
Data produced
What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).
{{ data.<step>.jobId }}—string. The extraction job identifier, to pass to Get the result.{{ data.<step>.ready }}—boolean. Get the result only: true when the fields are available, false while Mindee is still working.{{ data.<step>.fields }}—object. Get the result only: the extracted fields, flattened.{{ data.<step>.fields.total_amount }}reads a simple field; an object gives its sub-fields, a list its items.{{ data.<step>.status }}—string. The job state at Mindee:Processing,ProcessedorFailed.{{ data.<step>.rawText }}—object. Get the result only: the raw text, when Also return the raw text was checked on sending.{{ data.<step>.simulated }}—boolean. true when the send was described instead of performed (test run).{{ data.<step>.summary }}—string. The one-line summary in the member’s language (withsummaryKeyandsummaryParams).
Operations
- Send an attachment for extraction (
enqueue, the default). The first selected attachment (selection,mime,namePattern) goes to the Model (model), with Also return the raw text (rawText) as an option. PublishesjobId. - Get the result (
result). Reads the Job (jobId). While Mindee is working,readyis false and the step still succeeds: add an If condition and another wait.
Example
text
Mindee action=enqueue, model=Supplier invoices, selection=byMime, mime=application/pdf
Wait 1 minute
Mindee action=result, jobId={{ data.<step>.jobId }}The amount is then read from {{ data.<step>.fields.total_amount }}.
Tips
- Delay. An extraction usually takes a few seconds; a one-minute wait is most often enough.
- Cost. Each send uses pages of the Mindee plan; on a test run nothing is sent.