CUSTOMER SUPPORT

Autonomous Refund Pre-Check and Reply Drafting Agent

An agent reads an incoming refund email, verifies the purchase in Stripe against the policy window, logs the decision to Postgres.

CategoryCustomer Support
Enginepaperclip
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew refund email in shared inboxGmailGmail
  • ActionMatch sender to Stripe purchaseStripeStripe
  • LogicEvaluate against policy window
  • ActionLog decision to Postgres audit tablePostgreSQLPostgres
  • OutputDraft customer reply for approvalGmailGmail

What it does

This runs a refund request end to end as an agent task. It interprets the customer's message, confirms the matching Stripe purchase, applies the policy window, records the structured decision in Postgres for audit, and writes a finished, empathetic reply explaining the outcome and the reasoning, ready for an agent to approve and send.

When to use it

Use it when refund volume is high and you want consistent, well-written first-draft replies that already contain the eligibility decision and its justification, while keeping a human in the loop for the final send.

How it works

  1. 1A new refund email arriving in the shared inbox triggers the agent.
  2. 2The agent matches the sender to their Stripe purchase and reads the charge date and amount.
  3. 3It evaluates the purchase against the policy window and any exceptions.
  4. 4It writes the structured decision and rationale to a Postgres audit table.
  5. 5It drafts the customer reply with the verdict and reasoning and routes it for human approval.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GmailRead, draft, send, label.
  2. 2
    Connect StripeCustomers, subscriptions, payments.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.