DOCUMENT OPS
Intake signed contracts from email, file them in Dropbox, and index to Postgres
Triggers on incoming email with PDF attachments, verifies the document is a signed contract, archives it to a structured Dropbox folder.
How it runs
The automated pipeline, trigger to output.
- TriggerNew email with PDF attachment in intake inboxGmail
- ActionExtract text; detect if it's a signed contractOpenAI
- LogicDrop non-contracts; route valid agreements forward
- ActionArchive PDF to counterparty Dropbox folderDropbox
- OutputIndex metadata + archive path to PostgresPostgres
What it does
Many signed contracts arrive as email attachments, not tidy folder drops. This workflow watches an intake inbox, confirms each PDF attachment is actually a signed agreement, files it into the right Dropbox folder by counterparty, and writes the extracted metadata to the Postgres index — closing the loop from inbox to searchable repository.
When to use it
Use it when contracts come back signed over email and someone is manually saving and renaming files. Great for sales ops and legal intake teams that want every executed agreement captured the moment it hits the inbox.
How it works
- 1A new email with a PDF attachment in the intake inbox triggers the run.
- 2The attachment text is extracted and a model decides whether it is a signed contract (versus a draft, NDA-only, or unrelated PDF).
- 3A logic step drops non-contracts and routes valid ones forward.
- 4The PDF is uploaded to a counterparty-named Dropbox folder for archival.
- 5Extracted metadata plus the Dropbox archive path is indexed into the Postgres contracts table.
Set it up
What you configure once, before turning it on.
- 1Connect GmailRead, draft, send, label.
- 2Connect OpenAIModels, embeddings, files.
- 3Connect DropboxFiles and folders.
- 4Connect PostgresAny Postgres URL — query, write, migrate.
- 5Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 6Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 7Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More Document Ops workflows
Flag redline deviations when a contract lands in Drive
Watches a Google Drive folder for incoming counterparty contracts, diffs each clause against your approved template library.
Gate contract signing on clause-deviation approval
When a contract is submitted for signature via webhook, diffs its clauses against approved templates and either auto-approves clean documents or holds them in Slack for explicit…
Triage emailed contract redlines and route by risk
When a counterparty emails a redlined contract, extracts the attachment, diffs clauses against approved templates.
Draft a negotiation brief from contract clause deviations
An agent reviews a contract against approved templates, researches each deviation.
Log contract clause deviations to a Notion review register
On a daily schedule, scans a Drive contracts folder, diffs clauses against approved templates with OpenAI.
Weekly audit of clause drift across the contract repository
Each week, scans all executed contracts in Drive, measures how far each clause has drifted from approved templates.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
