INVOICE PROCESSING

FX-Normalize Emailed Invoices to Base Currency on Receipt

Watches a shared AP inbox for invoice emails, extracts amount and currency, captures the FX rate as of the invoice date.

CategoryInvoice Processing
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew invoice email in AP inboxGmailGmail
  • ActionExtract amount, currency, invoice dateOpenAI
  • LogicCurrency differs from base?
  • ActionFetch FX rate as of invoice dateHTTP webhook
  • OutputInsert original + base-currency rowPostgreSQLPostgres

What it does

Every invoice that lands in your AP inbox gets normalized to your reporting currency the moment it arrives — with the exchange rate pinned to the invoice's own date, not today's rate. The result is an AP ledger where every row carries the original amount, the currency, the rate used, and the base-currency equivalent.

When to use it

Use this when vendors bill you in many currencies and your finance team is hand-converting amounts in spreadsheets. It removes the rate-date guesswork that makes month-end reconciliation drift.

How it works

  1. 1A new email arriving in the monitored Gmail label fires the trigger.
  2. 2An OpenAI extraction step parses the invoice for vendor, invoice number, amount, currency code, and invoice date.
  3. 3A logic step checks whether the currency differs from your base currency.
  4. 4If it does, an HTTP call fetches the historical FX rate for that currency on the invoice date.
  5. 5The original amount, currency, rate, rate-date, and computed base-currency total are inserted into the Postgres AP table.
  6. 6A confirmation note posts back so AP knows the invoice is booked and normalized.

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
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.