← Rig your own
Somebody asked

“When a customer emails asking for a refund, someone works out whether our policy allows it and writes back.”

Our answer

Automate part of it

Automate part of it. It does things that can't be undone — keep a person on those.

Also: it handles sensitive information.

high confidenceYou gave us the numbers this rests on.
Costs you today / month
$878
Would cost to run / month
$151
You keep / month
$727
Pays back in 9.9 months · setup ~$7,200
What went into that
Can't be undone
2 actions

log decision, send reply — these need to ask first.

Still needs you
17% of the work

Some runs come back to you, which eats into the saving.

you said a person checks every one, so their time is in the running cost

Sensitive data
high

Worth keeping a person on the parts that touch this.

How often
80 a month

Often enough that saved minutes add up.

you said "a few times a week", 6 each time — that's about 78 a month

Time it takes now
15 min each

Long enough that handing it over is worth something.

you said "10 to 20 minutes"; we used the middle of that, 15 minutes

Pays for itself in
9.9 months

$878 of time a month against $151 to run it.

we treat inside 12 months as worth doing and past 18 as not — those cut-offs are our judgement, not arithmetic

Needs judgement
classify request

There's a step here that needs reading and interpreting, which is what AI is actually for.

What would change this
  • At 80 a month it pays back in 9.9 months. Below about 65 a month it stops being worth it.
  • That $7,200 is what it costs to get this running reliably — setup, a test set, and the first month of fixing it. Set it up yourself over a weekend instead and it's nearer $650 — payback drops to about 0.9 months.

$7,200 ÷ (12 months × $9.32 saved per run) = 65 a month

Take it to a builder

We don't build it. Your builder does that better than we ever could — it knows every one of its own connectors. Copy this and paste it in.

Where this goes

Open n8n, start a new workflow, and click the ✨ AI button. Paste this in.

n8n-prompt.md

Paste into n8n's AI workflow builder. Names the real nodes and says what n8n won't enforce.

Build me this workflow. I've had it designed already — the detail below is deliberate, so please follow it rather than simplifying it.

## What it should do

Decide whether a refund request meets the policy, then write the customer back with the answer.

**Finished looks like:** Every refund email gets a policy-based decision and a reply, with the reason logged.

## When it should run

A few times a week, more after a sale.

Use a Schedule Trigger node (n8n-nodes-base.scheduleTrigger).

## The steps, in order

1. **fetch order** — Look up the order behind the request.
2. **classify request** — Work out what the customer is asking for.
3. **log decision** — Write the decision and reason to the ops sheet.
   - This one is permanent. It cannot be undone once it runs.
4. **send reply** — Email the customer the decision.
   - This one is permanent. It cannot be undone once it runs.
   - **Stop and wait for a person to approve before this runs.** Why: A refund promise in writing is hard to walk back.

## Accounts to connect

- Email (Gmail or Outlook)
- Shopify
- Spreadsheets

Use my own credentials for each. Don't hardcode anything.

## Must-haves — please don't skip these

- 2 steps change something outside the system: log decision, send reply. Point them at a test account first.
- Approvals must actually block. A notification that carries on regardless is not an approval.
  Use a Wait node (n8n-nodes-base.wait) in "On webhook call" resume mode — send the approver {{ $execution.resumeUrl }} and nothing downstream runs until they open it.
- Don't retry automatically. Nothing here says which errors are safe to retry, and retrying a write without a dedupe key applies it twice.
- When a step fails: retry the lookup twice, then queue it for a person.
- Before **send reply**, check it hasn't already been done — key off `email_message_id`.
  Mint those keys once with a Set node at the top of the workflow to mint the run id and any dedupe keys.
- Stop and alert me if spending passes $0.2 on one run or $6 in a day.
  Track a running total and gate it with an IF node (n8n-nodes-base.if), routing the false branch to a NoOp that stops the run.
- Give up after 10 steps across the whole run rather than looping.

## What n8n won't enforce on its own

A workflow engine. Strong on steps and approvals, blind to agent loops. So after you've built it, these are on me — please leave a note in the workflow for each:

- **Iteration ceiling** — the design asks for stop after 5 iterations. Add an execution counter and hard-fail past the limit, or the agent can loop until the bill stops it.
- **Sandbox isolation** — the design asks for runs against your Shopify account with read-only order scope. Run it somewhere with least privilege. The target gives you no isolation.
- **Typed tool schemas** — the design asks for 4 tools with typed input schemas. Validate the payload yourself before the call, or the model will invent fields.
- **Spend ceiling** — the design asks for USD 0.20. Set a spend alert on the model provider — the platform will not stop for you.
- **Idempotency keys** — the design asks for send_reply → email_message_id. Deduplicate on your side before the write, or a retry will double-apply it.

---

Designed with RIG. RIG works out whether a job is worth automating and writes the brief — it doesn't build or run anything.
Being straight with you

Their builder will get most of this right and some of it wrong — it always does. The part worth checking is the approvals: builders like adding a notification where the design asked for a hard stop. Everything under "what it won't enforce" is genuinely on you.