INVOICE PROCESSING

Gate invoice approvals on a duplicate cross-check

When an approver clicks Approve in your AP system, a webhook re-validates the invoice against paid history in Postgres and Stripe charges.

CategoryInvoice Processing
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInvoice approval webhook receivedHTTP webhook
  • ActionCheck paid history in PostgresPostgreSQLPostgres
  • ActionQuery matching charges in StripeStripeStripe
  • LogicAlready paid in either source?
  • OutputReject approval and notify approver in SlackSlack

What it does

Sits at the approval step. The instant someone approves an invoice, this flow does a last-mile check: it confirms the invoice has not already been paid by scanning both the Postgres ledger and recent Stripe charges. If a prior payment exists, it overturns the approval and tells the approver why, so no second payment is ever scheduled.

When to use it

Use this when approvers act fast and may not remember whether a bill was already cleared, especially for recurring vendors. It enforces the duplicate check as a hard gate rather than relying on memory.

How it works

  1. 1The AP system fires an approval webhook with the invoice ID.
  2. 2The flow reads the invoice details from the payload.
  3. 3It checks the Postgres paid-history table for a prior payment.
  4. 4It also queries Stripe for charges matching the vendor and amount.
  5. 5A logic branch decides whether either source shows it as paid.
  6. 6If already paid, the approver is messaged in Slack and the approval is rejected.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect StripeCustomers, subscriptions, payments.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  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.