The action pipeline
When a trigger matches, the pipeline finds or creates a case using the identifier, routes it to a mailbox, saves the file, and runs extraction. You configure the destination parameters.
Document Blueprint processes incoming files through a fixed sequence. You rely on this pipeline to turn raw emails and folders into organized case files. The shape of the sequence never changes. You configure the parameters in the Mailbox routing row and the optional steps you add with the plus beside Flow (Extraction, Copy to Drive).
Finding the case identifier
The pipeline finds a case identifier before it saves a file. It checks the delivery envelope first. It reads the Gmail subject, sender, or body, or the Drive file name, dates, or folder.
If the delivery envelope lacks an identifier, the app opens the file for pre-extraction. It checks the first allowed extractable attachment. It pulls the field marked as the identifier on the template. A pre-extraction failure does not stop the pipeline. The file falls back to the no-identifier route.
Routing the case
Both Gmail and Drive automations route files the same way. The pipeline takes one of three paths:
- Identifier matches an existing case: The app merges the file into that case and applies the Mailbox setting. It pulls the case out of Archive or Trash if needed. A "Moved to ..." entry appears in the Activity timeline only if the mailbox actually changes.
- Identifier found but no match: The app creates a new case with that identifier.
- No identifier found: The app creates a new case with an auto-generated ID.
Saving the file
The app writes files to its own storage. It adds provenance pointing back to the original email or Drive file. Gmail saves up to three attachments at the same time.
If you turn off extraction, you must choose a Document type in the destination node. The app saves the file under that type. A missing Mailbox or Document skips ingestion entirely. If you omit a template on a save-only automation, the app creates a case with an auto-generated ID and still saves the files.
A Gmail automation can mirror files to Google Drive. You enter a folder name in the Drive copy field. The app creates the folder on first use. An empty field means no copy is made.
Skipping duplicates
The app skips duplicate files automatically. A duplicate refreshes case metadata and can trigger a mailbox move. The app then skips the duplicate file write and extraction.
Gmail identifies duplicates using the message ID plus the lower-cased filename. Distinct attachments with the same name on one email will collide. Drive identifies duplicates using the file ID.
Running extraction
Extraction is an optional step. Add it with the plus beside Flow, then select a compatible Template.
The pipeline extracts data using Gemini. The native extractable types are PDF, PNG, JPEG, webp, heic, heif, and gif. New Gmail automations allow PDF, PNG, and JPEG by default. An empty allowlist accepts all file types. The app saves allowed but non-extractable files without running extraction.
Extracted values populate the case fields. The extract node explains the routing premise. You can add delivery fields to your template directly from the capture panel.
Failures and runs on past items
The pipeline isolates failures. An extraction error does not stop the app from saving the file. Gmail isolates attachments, so one bad file does not stop successful sibling attachments. A complete failure logs an error in the Activity panel under the canvas.
Manual edits on a case do not replay file ingestion. Editing a watched case-data field does trigger a case-data automation.
You can run historical items through the pipeline from the Run on past emails section (Gmail) or Run on past files section (Drive) in the automation editor. It is available only for saved automations. It processes 50 items at a time between two dates. You click Run and then Continue · 50 more.
The Gmail past-emails run offers duplicate policies, under If the case already exists. You can choose Skip, Overwrite, or Rename. The Overwrite option replaces the file in place. The Rename option adds a duplicate copy. The Drive past-files run hides these choices. An unmodified Drive file is not re-extracted by rerunning a range.