Skip to main content
File-drop triggers let your agents start automatically when a new file arrives — in a monitored cloud folder, as an email attachment, or via the Duvo-hosted upload endpoint — without anyone having to kick off a Run manually.

Key Capabilities

  • Cloud folder monitoring — Watch a Google Drive folder, OneDrive folder, or SharePoint library for new files and start a Run as each one lands
  • Email attachment monitoring — Start a Run when an email arrives in Gmail or Outlook with an attachment, passing both the message and its files to the agent
  • Duvo-hosted upload endpoint — Upload files programmatically via the Duvo API (sandbox upload), then start a Run with those files as input. Useful when an external system (a form, script, or pipeline) needs to push files to Duvo directly over HTTP
  • Deduplication with Agent Memory — Track which files have already been processed so the agent never acts on the same file twice
  • Multi-format support — Process PDFs, spreadsheets, images, Word documents, and other formats using the built-in Email Attachments Reader and Intelligent Document Reader connections
  • Flexible response — Extract structured data, validate against business rules, write records to downstream systems, and flag anomalies for human review

How File-Drop Triggers Work

Duvo does not currently support a native “watch folder” push event. File-drop monitoring is implemented by scheduling an agent to run on a short interval — every 5 or 15 minutes, for example — and having the AOP list new files in the target folder, compare against what it has already seen (stored in Agent Memory), and process only the new ones. For email attachment workflows, you can use the email trigger directly: the agent fires as soon as a new email arrives in the connected inbox. No polling interval is needed.

When to Use File-Drop Triggers

  • Invoice processing — Vendors drop PDF invoices in a shared folder; the agent extracts fields and posts records to your accounting system
  • Document validation — Suppliers submit compliance documents via email; the agent checks required fields and flags missing information
  • Report ingestion — A third-party system exports CSVs to a shared drive nightly; the agent imports and transforms the data each morning
  • Image and scan processing — Field teams photograph forms and upload to a shared folder; the agent reads and transcribes each image

How to Set It Up

Push, seconds latency. This is the simplest path. Use it when files arrive as email attachments.

Open Setup

Open your agent and go to Setup.

Enable the email trigger

Enable the Gmail or Microsoft Outlook trigger.

Add a sender filter (optional)

Optionally add a sender filter to restrict the trigger to emails from known senders (see Sender-Scoped Email Triggers).

Add the attachment reader

Add the Email Attachments Reader connection to extract data from PDF, Excel, image, and other attachment types.

Write your AOP

Write your AOP to describe what to do with each attachment — extract fields, validate, write records.

Worked Example — Vendor Invoice Processing

Outcome: Vendor invoices arrive in a shared Google Drive folder. Each invoice is read, key fields are extracted, a record is written to your accounting spreadsheet, and anomalous invoices are held for human review. Connections used:
  • Google Drive — list and read files in the shared folder
  • Intelligent Document Reader — extract fields from PDF invoices
  • Google Sheets — write extracted records
  • Human-in-the-Loop — pause for review when a field is missing or out of range

Before You Start

Make sure you have these ready before building the agent:
Invoice folder — A shared Google Drive folder where vendors drop invoices. Note the folder name or ID.
Approved vendor list — A Google Sheet with a column of valid vendor names (for example, a sheet named “Approved Vendors” with a “Vendor Name” column). Optionally add an “ERP Vendor ID” column for downstream mapping. Note the sheet name and tab.
Accounting spreadsheet — A Google Sheet where extracted invoice records will be written. Note the sheet name and column headers you expect (Vendor Name, Invoice Number, Invoice Date, Due Date, Line Items, Total Amount, Processed Date).
Google Drive and Google Sheets connectionsConnect Google Drive and Connect Google Sheets from the Connections page.
Agent Memory enabled — You will enable this in Step 4; no pre-configuration needed.

Create the agent

  1. Click + Create Agent from your dashboard.
  2. Select Use Agent Builder.

Write your AOP

Paste and adapt this into the Agent Builder:

Add connections

Under Connections, enable:
  • Google Drive — to list and read files in the shared folder
  • Intelligent Document Reader — already available by default
  • Google Sheets — to write invoice records and look up the approved vendor list
  • Human-in-the-Loop — already available by default

Enable Agent Memory

Go to Setup and enable Agent Memory. This allows the agent to store the list of processed file IDs between Runs.

Set a schedule

  1. Click Schedule in the agent header.
  2. Choose Custom and set an interval of every 15 minutes, or every hour if near-real-time processing is not required.
  3. Click Add schedule to save.

Test with a sample invoice

  1. Upload a sample invoice PDF to the Google Drive folder.
  2. Click Start Work to run the agent manually.
  3. Confirm the fields were extracted correctly and the row was written to your spreadsheet.
  4. Upload a second PDF with a missing field and verify the Human-in-the-Loop request is created.

Expected Results

When the agent is running: In Google Sheets:
  • A new row for each valid invoice, with all extracted fields populated.
  • No rows created for invoices with validation errors — those are held for review.
In your Requests:
  • A Human-in-the-Loop request for each invoice with a missing, unreadable, or anomalous field.
In Agent Memory:
  • The processed_files list grows with each Run. Files already processed are skipped even if they are still in the folder.
In Duvo:
  • A session log per scheduled Run showing which files were found, processed, and skipped.

Troubleshooting

  • Folder path: Verify the folder name or ID in your AOP matches the actual folder in Google Drive. Paste the folder URL into the AOP if the name is ambiguous.
  • Memory conflict: If the processed_files list was corrupted or contains a wrong ID, clear the memory for this agent in Setup > Agent Memory and let it reprocess.
  • Permissions: Confirm the Google Drive connection has read access to the shared folder, including folders owned by others. Re-authorize from the Connections page if needed.
  • The processed_files key in Agent Memory is case-sensitive. Make sure your AOP writes the same file ID format that it reads when checking for duplicates.
  • If Agent Memory was cleared, files previously processed will appear new on the next Run.
  • Scanned PDFs: Low-resolution scans reduce extraction accuracy. Ask vendors to send native PDFs where possible.
  • Multi-page invoices: Explicitly state in your AOP: “Read all pages of the document.”
  • Non-standard layouts: Add two or three sample invoices to Files and reference them in the AOP as formatting examples.
By default, listing a folder returns only top-level files. To include subfolders, add to your AOP: “List all files in the folder and all its subfolders recursively.”

Take It Further

Route by vendor
Send a confirmation to the vendor
Trigger from Slack Drop a file directly in a Slack channel and mention the Duvo app to process it on demand, rather than waiting for the next scheduled Run. See Slack Mention Workflows.

Event-Driven Triggers

Overview of all trigger types and the trigger matrix.

Scheduling Agents

Set the polling interval for cloud folder monitoring.

Agent Memory

Store processed file IDs to prevent duplicate processing.

Human-in-the-Loop

Handle anomalous invoices with approval gates.

Email Attachments Reader

Extract data from PDFs, spreadsheets, and images attached to emails.

Intelligent Document Reader

Parse unstructured PDFs from cloud storage.

Google Drive

Connect your Google Drive.

Microsoft OneDrive

Connect your OneDrive.

Microsoft SharePoint

Connect your SharePoint library.

Running Agents via API

Full API reference for the Duvo-hosted upload endpoint (sandbox creation, file upload, run start).