Finance/First-party starter agent

Invoice approval routing

Route invoices described in email bodies for approval; flag attachment-only invoices for review.

// what it does
  1. 01Read the email body. Extract the vendor, invoice number, amount, currency, line items, and due date only from readable Gmail message text. You cannot read attached PDFs or images. When required facts are only in an attachment or missing, mark the invoice needs review, include the Gmail link and attachment names, and stop processing that invoice until a person supplies readable details.
  2. 02Match the PO. If a purchase order is referenced, look it up in the knowledge base or readable text returned by a connected Google Drive action and compare vendor, amounts, and quantities. A file link or download is not readable evidence. Hold missing, unreadable, or mismatched POs for review.
  3. 03[Approval gate] Compare the invoice against the operator-supplied amount band and expected review authority. If the policy is missing or the invoice is out of band, mark it held and complete this and the remaining filing step as not applicable without requesting approval or filing. Otherwise include the expected reviewer, email-body facts, Gmail source link, and PO comparison in the native review task. Do not claim to have verified hidden routing settings; the operator must check assignment in Tasks. The approver decides in the app or supported Slack controls; email notifications link to the review. Continue only after explicit approval.
  4. 04File the approved summary. Save a text record of the email-body facts, Gmail source link, PO match, and approval decision to Google Drive for accounts payable. Label it as a summary, not the original invoice. Do not claim that an attachment was read, copied, or archived.
// guardrails in the draft

Never mark an invoice approved or trigger payment without the designated approver's explicit approval.

If the invoice doesn't match its PO (amount, vendor, or missing PO), hold it and flag the discrepancy — do not route it as clean.

Route strictly by the approval thresholds; never route a high-value invoice to a lower-authority approver.

Watch for duplicate invoice numbers and possible fraud (changed bank details, unknown vendor) and escalate rather than proceeding.

Before you publish this agent

Agent updated

Prepare the approval policy and source records

Use this agent for invoices whose required details are in the email body. It cannot read attached PDFs or images: attachment-only invoices go to a person for review. Before connecting Gmail, Slack, and Google Drive, identify the incoming mailbox, a readable purchase-order source, and the destination for approved text summaries. Configure one amount band and its approval assignee per agent; use separately configured agents for other authorities. Thresholds written in a prompt do not dynamically route Tasks, and assignment does not remove administrator decision authority. Hold missing facts or out-of-band invoices for an operator.

The agent routes approvals; it is not authorization to pay a vendor. Configure the permitted actions and review gates to match that boundary. Give the reviewer the invoice number, vendor, amount, purchase-order match, and any discrepancy. A Slack heads-up should help the reviewer find the decision, not stand in for the explicit approval required by the instructions.

Test discrepancies before ordinary volume

Start with an invoice whose purchase order matches, then test an amount mismatch, a missing purchase order, and an invoice number that already exists. Include a changed bank detail or unknown vendor so the owner can inspect the escalation. Confirm the draft holds a discrepancy instead of presenting it as a clean match. Use controlled folders and sample messages while evaluating writes.

A useful result is a routed decision with enough context to review, followed by a text summary only after approval. The summary links to Gmail; it does not archive the original attachment. Email notifications link to the app for review, and replying to them does not approve an invoice. Inspect the run trace and destination folder together. Test an attachment-only invoice and confirm it stays in review with no invented amount or approval route.

Make invoice approval routing yours.

Request access and we'll start with a private draft. You keep control of the tools, permissions, tests, and publication decision.