Free n8n template

Refund and return requests n8n template

What it does

An importable n8n workflow that takes a return form submission, has Claude map the customer's reason to a reason code, matches the Shopify order by number and email, and applies your return window, final-sale and risk rules in code. Clean returns at or under your refund limit are approved by email. Larger refunds and anything flagged need a person to click Approve in Slack.

What this workflow does

  1. Return request form (Webhook) receives order number, email, SKUs, the customer’s reason and an optional photo link.
  2. Prepare request (Code) normalizes the input and notes any missing fields.
  3. Classify reason with Claude (HTTP Request) returns strict JSON: a reason code from your list, whether it is a damage claim, whether the customer mentions a dispute, a one-line summary and a confidence score.
  4. Find Shopify order (HTTP Request, GraphQL Admin API) looks up the order by number and email, with line items, product tags, fulfillment dates and existing returns.
  5. Policy and risk check (Code) applies your policy table: return window, non-returnable tags, payment status, prior returns, missing photos on damage claims, dispute mentions and the refund limit. It also handles AI refusals and errors.
  6. Route decision (Switch) sends each request to auto-approve, review or exceptions.
  7. Review in Slack posts the details with Approve and Decline buttons and waits up to 48 hours. Apply review decision and Approved? record the outcome, including timeouts.
  8. Email customer approval (Gmail) and Log return decision (Google Sheets) run for approved returns. Declined and timed-out requests are logged for the reviewer to follow up.
  9. Post return exception (Slack) catches unknown orders, failed lookups and incomplete forms.

Before you import

  • A current n8n version with a public webhook URL and a return form that can POST JSON.
  • A Shopify Admin API access token with read_orders (and read_all_orders, which Shopify may require you to request, for orders older than 60 days). Existing custom apps created in the Shopify admin keep working, but since January 1, 2026 new apps must be created in Shopify’s Dev Dashboard, which issues a client ID and secret instead of showing a token. Check how you will get and refresh the token before setting up n8n’s Shopify Access Token credential.
  • An Anthropic API key, a Slack bot in the returns and exceptions channels, Gmail for customer email and a Google Sheet for the log.

Setup

  1. Import the JSON and connect all five credentials.
  2. Point your form at the production webhook URL using the JSON body in the sticky note.
  3. Edit POLICY in Policy and risk check: window days, non-returnable tags, reasons that need a photo, and autoApproveMax.
  4. Replace REPLACE_WITH_SHOP, REPLACE_WITH_SHEET_ID, REPLACE_WITH_SLACK_RETURNS_CHANNEL_ID, REPLACE_WITH_SLACK_EXCEPTIONS_CHANNEL_ID, REPLACE_WITH_RETURN_INSTRUCTIONS_URL and REPLACE_WITH_COMPANY_NAME.
  5. Add a Returns log tab with headers: received_at, order_number, order_name, email, decision, reason_code, refund_estimate, currency, items, blockers, risk_flags, ai_summary, reviewed_at.

Test it

Submit four requests: a small wrong-size return inside the window, a damage claim without a photo, an order above your limit, and an order number that does not exist. Expect one approval email, two Slack reviews and one exception. Approve one review and decline the other, then check the log.

Make it production-ready

  • Set autoApproveMax to 0 for the first two weeks so every request is reviewed, then raise it.
  • The refund figure is an estimate from list prices. Let Shopify calculate the real refund when you issue it, so discounts, tax and shipping are allocated correctly.
  • Add the next steps from the guide: create the return in Shopify, generate a label in ShipStation, and refund on carrier scan.
  • Protect the webhook with header authentication and add an n8n error workflow.
  • Write unit tests for the policy code using real edge cases such as partial returns of discounted bundles.

Read the full guide on automating refund and return requests for policy design and refund timing, or talk to Lumeor about connecting WooCommerce, Stripe or Gorgias.

Next steps