INVOICE PROCESSING

Convert emailed foreign invoices and route stale-rate ones for review

Reads invoice attachments arriving by email, converts each to base currency at the posting-date rate.

CategoryInvoice Processing
Enginesim
Difficultyintermediate
Triggerevent
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInvoice email with attachment receivedGmailGmail
  • ActionExtract amount, currency, posting date with OpenAIOpenAI
  • ActionFetch historical rate for posting dateHTTP webhook
  • LogicBranch on posting-date freshness window
  • OutputInsert fresh invoice into PostgresPostgreSQLPostgres
  • OutputCreate Trello review card for stale invoicesTrelloTrello

What it does

This workflow handles invoices that arrive as email attachments. It extracts and converts each one to base currency, but adds a guardrail: if the posting date is stale enough that the historical rate may be unreliable or backdated, it diverts the invoice to a human-review task rather than booking it automatically.

When to use it

Use it when vendors email invoices directly and you want straight-through processing for fresh invoices while still catching old or backdated documents that could distort your FX-normalized books.

How it works

  1. 1A new email with an attachment in the monitored inbox triggers the run.
  2. 2An OpenAI step extracts amount, currency, and posting date from the attachment.
  3. 3An HTTP action retrieves the historical FX rate for the posting date.
  4. 4A logic step checks how old the posting date is against a freshness window.
  5. 5Fresh invoices are inserted into Postgres as normalized records.
  6. 6Stale or backdated invoices create a Trello card in the manual-review queue.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GmailRead, draft, send, label.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect HTTP webhookTrigger any URL on agent actions.
  4. 4
    Connect PostgresAny Postgres URL — query, write, migrate.
  5. 5
    Connect TrelloKanban boards for everything.
  6. 6
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  7. 7
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  8. 8
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.