The action pipeline

When a trigger matches, the automation downloads the file, finds or creates the case by identifier, moves that case into the destination mailbox, saves the file with its category, and runs extraction if a template is set.

Updated 2 min read

The pipeline's shape is fixed: you configure the parameters (mailbox, category, template, storage), not the steps. An automation needs both a category and (if Extract is on) a template that resolves at run time. If either is missing, ingestion is skipped on purpose.

What happens, in order

1. Identifier pre-extraction (Gmail). When extraction is on, the automation reads the first allowed extractable attachment, a PDF or image (PNG, JPEG, webp, heic, heif, gif), and pulls the case identifier (the field marked as the identifier on the template) before anything is saved. Without an identifier it falls through to the no-identifier path below.

2. Case routing (Gmail). Three paths:

  • Identifier matches an existing case → merge into it, and move that case to the automation's mailbox, even out of Archive or Trash. A "Moved to …" entry appears in the case's activity timeline whenever the mailbox actually changes. (This is how a won bid jumps from Archive into a "Confirmations" mailbox when the award email lands.)
  • Identifier extracted but no match → atomically create a new case with that identifier.
  • No identifier at all → create a new case with an auto-generated ID.

Drive imports are simpler: each Drive file gets its own case, keyed to the file itself, and never merges into or moves an existing case.

3. Save the file. The file is written to storage and attached to the case with its category tag plus provenance pointing back at the originating message or Drive file. File storage (Firebase / Google Drive / Both) controls the destination when both integrations are connected.

4. Run extraction. If the Extract node is on, extraction runs against the saved file using the chosen template. Gemini AI-extracts PDFs and images (PNG, JPEG, webp, heic, heif, gif) natively. File types that passed the allowlist but aren't extractable (e.g. CSV) are stored without extraction, not an error. Extracted values populate the case's fields.

5. Duplicates are skipped automatically. If the same source file shows up again (same attachment on the same email, or the same Drive file), it's recognized and skipped: the case is left untouched. Nothing to configure. The one exception is a manual backfill run, where you choose per run whether already-imported files are skipped, overwritten in place (handy for re-extracting after a template fix), or added as renamed copies.

An automation pipeline
1identifier extracted (INV-2026-0412)
2matched existing case
3file saved with category Invoice
4extraction ran (12 fields populated)

Sequential, fail-closed

Steps run in order. If one fails (extraction errors, storage refuses the file, the destination category can't be resolved), the rest stops and the failure is logged in the Activity panel under the canvas. Manual edits made on the case afterwards don't replay through the pipeline; they're independent edits.

We use cookies to keep you signed in and improve the product. See our Cookie Policy.
Manage preferences