Intermediate~20 min setupProductivity & E-commerceVerified April 2026
Google Sheets logo
Shopify logo

How to Track Shopify Refunds in Google Sheets with N8n

Automatically log Shopify refund details to Google Sheets when refunds are issued, tracking order numbers, amounts, reasons, and dates.

Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.

Best for

E-commerce stores needing real-time refund tracking with custom data formatting and webhook verification.

Not ideal for

Teams wanting plug-and-play setup without server maintenance or webhook troubleshooting.

Sync type

real-time

Use case type

sync

Real-World Example

💡

A 25-person fashion e-commerce company uses this to track refund patterns across product categories and seasonal trends. Before automation, their customer service manager manually exported Shopify refund reports weekly and spent 2 hours copying data into tracking spreadsheets. Now refunds appear instantly in Sheets with formatted dates and amounts, letting them spot refund spikes within hours instead of weeks.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

Each platform counts differently — Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.

Prices shown for annual billing. Based on published pricing as of April 2026.

Estimated ROI

1000

min saved/mo

$583

labor value/mo

Free

no platform cost

Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.

Implementation

Skip the setup

Import this workflow directly into n8n

Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured — you just need to connect your accounts.

Before You Start

Make sure you have everything ready.

Shopify store with admin access to create webhooks
Google account with Google Sheets access
N8n instance running and accessible via public URL
Google Sheets spreadsheet created with refund tracking headers

Optional

Basic understanding of JSON data structure

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Order Numberorder.order_number
Refund Amountrefund.amount
Refund Daterefund.created_at
Refund IDrefund.id
2 optional fields▸ show
Refund Reasonrefund.note
Order Totalorder.total_price

Step-by-Step Setup

1

Dashboard > New Workflow

Create New N8n Workflow

Start a new workflow in N8n to capture Shopify refund events. This workflow will trigger whenever a refund is processed in your Shopify store.

  1. 1Click 'New Workflow' from your N8n dashboard
  2. 2Name it 'Shopify Refunds to Sheets'
  3. 3Click 'Save' to create the workflow
What you should see: You should see an empty workflow canvas with a single 'Start' node visible.
2

Add Node > Trigger > Webhook

Add Shopify Webhook Trigger

Configure N8n to listen for Shopify refund events. The webhook trigger will fire immediately when refunds occur in your store.

  1. 1Delete the 'Start' node and add a 'Webhook' node
  2. 2Set HTTP Method to 'POST'
  3. 3Copy the webhook URL that appears
  4. 4Set Authentication to 'None'
What you should see: The webhook node shows a unique URL starting with your N8n instance domain.
Common mistake — Don't enable authentication here - Shopify's webhook verification happens through HMAC signatures, not basic auth
n8n
+
click +
search apps
Google Sheets
GO
Google Sheets
Add Shopify Webhook Trigger
Google Sheets
GO
module added
3

Shopify Admin > Settings > Notifications > Webhooks

Configure Shopify Webhook

Tell Shopify to send refund data to your N8n webhook. This creates the connection between refund events and your automation.

  1. 1Go to Shopify Admin > Settings > Notifications
  2. 2Scroll to 'Webhooks' section and click 'Create webhook'
  3. 3Set Event to 'Refund created'
  4. 4Paste your N8n webhook URL in the URL field
  5. 5Set Format to 'JSON' and click 'Save'
What you should see: Your new webhook appears in the list with status 'Active' and event 'refunds/create'.
Common mistake — Select 'refunds/create' not 'orders/refunded' - the latter doesn't include detailed refund line items
4

Add Node > Function

Add Webhook Verification

Verify incoming webhooks are actually from Shopify using HMAC validation. This prevents fake refund data from entering your sheets.

  1. 1Add a 'Function' node after the webhook
  2. 2Connect the webhook output to the function input
  3. 3Paste the HMAC verification code in the function
  4. 4Add your Shopify webhook secret as an environment variable
What you should see: The function node shows 'Function' as the operation with your verification code visible in the editor.
Common mistake — Get your webhook secret from Shopify's webhook detail page - it's different from your API key
5

Add Node > Data > Set

Extract Refund Data

Parse the Shopify webhook payload to extract refund details. This transforms raw JSON into the specific fields you need for tracking.

  1. 1Add a 'Set' node after the function
  2. 2Click 'Add Value' and set 'order_number' to {{ $json.order.order_number }}
  3. 3Add 'refund_amount' mapped to {{ $json.refund.amount }}
  4. 4Add 'reason' mapped to {{ $json.refund.note }}
  5. 5Add 'refund_date' mapped to {{ $json.refund.created_at }}
What you should see: The Set node shows 4 mapped values with Shopify field references visible in each value field.
Common mistake — Use 'order.order_number' not 'order.id' - customers recognize order numbers, not internal IDs
6

Add Node > Data > Set

Format Refund Amount

Convert the refund amount from cents to dollars for readable tracking. Shopify sends amounts as integers (2500 = $25.00).

  1. 1Add another 'Set' node after the first one
  2. 2Click 'Add Value' and set name to 'formatted_amount'
  3. 3Set value to {{ parseFloat($json.refund_amount) / 100 }}
  4. 4Keep all other fields from the previous node
What you should see: The new Set node shows the formatted_amount field alongside the original refund data fields.
Common mistake — Map fields using the variable picker — don't type field names manually. Hand-typed variable names often have invisible spacing errors that produce blank output.
7

Add Node > Apps > Google Sheets

Connect Google Sheets

Authenticate with Google Sheets to write refund data. N8n needs permission to create rows in your tracking spreadsheet.

  1. 1Add a 'Google Sheets' node
  2. 2Click 'Create New Credential'
  3. 3Choose 'Google Sheets OAuth2 API'
  4. 4Follow the OAuth flow to connect your Google account
  5. 5Test the connection
What you should see: Google Sheets node shows 'Connected' status with your Google account email visible.
Common mistake — Grant access to the Google account that owns your refund tracking sheet - shared access can cause permission errors
8

Google Sheets Node > Parameters

Configure Sheet Details

Point N8n to your specific refund tracking spreadsheet and worksheet. This tells the automation exactly where to write the data.

  1. 1Set Operation to 'Append'
  2. 2Select your refund tracking spreadsheet from the dropdown
  3. 3Choose the worksheet name (usually 'Sheet1')
  4. 4Set Range to 'A:E' to cover all refund columns
What you should see: The Google Sheets node shows your selected spreadsheet name and worksheet in the configuration fields.
Common mistake — Create the spreadsheet first with headers: Order Number, Refund Amount, Reason, Date, Month - N8n won't create it automatically
9

Google Sheets Node > Columns

Map Refund Fields

Connect each Shopify refund field to the correct Google Sheets column. This ensures data lands in the right place for tracking.

  1. 1Click 'Add Column' for each field you want to track
  2. 2Map Column A to {{ $json.order_number }}
  3. 3Map Column B to {{ $json.formatted_amount }}
  4. 4Map Column C to {{ $json.reason }}
  5. 5Map Column D to {{ $json.refund_date }}
What you should see: Each column shows the mapped Shopify field reference with proper JSON syntax.
Google Sheets fields
Column A
Column B
Email
Status
Notes
available as variables:
1.props.Column A
1.props.Column B
1.props.Email
1.props.Status
1.props.Notes
10

Add Node > Data > Set

Add Date Formatting

Format the refund date for better readability in your tracking sheet. Raw Shopify timestamps are hard to read and sort.

  1. 1Add a 'Set' node before Google Sheets
  2. 2Click 'Add Value' and name it 'readable_date'
  3. 3Set value to {{ DateTime.fromISO($json.refund_date).toFormat('yyyy-MM-dd') }}
  4. 4Update the Google Sheets date mapping to use readable_date
What you should see: The Set node shows the date formatting expression with DateTime function visible.
Common mistake — Use DateTime.fromISO() not new Date() - Shopify sends ISO 8601 format that requires proper parsing
11

Workflow > Execute Workflow

Test the Workflow

Process a test refund to verify data flows correctly from Shopify to Google Sheets. This catches mapping errors before going live.

  1. 1Click 'Execute Workflow' to activate listening mode
  2. 2Create a small test refund in your Shopify store
  3. 3Check N8n for the triggered execution
  4. 4Verify the new row appears in Google Sheets with correct data
What you should see: N8n shows a successful execution with green checkmarks on all nodes, and your Google Sheet has a new refund row.
Common mistake — Test with a real refund, not sample data - webhook payload structure can differ from API documentation
n8n
▶ Run once
executed
Google Sheets
Shopify
Shopify
🔔 notification
received
12

Workflow Header > Active Toggle

Activate Production Mode

Enable the workflow to run automatically for all future refunds. This starts continuous refund tracking without manual intervention.

  1. 1Click the toggle switch to 'Active' at the top of the workflow
  2. 2Verify the webhook is still responding
  3. 3Set up error notifications if desired
  4. 4Save the workflow one final time
What you should see: The workflow shows 'Active' status with a green indicator, and the webhook URL remains accessible.

Drop this into an n8n Code node.

JavaScript — Code Node// Add this to a Function node for duplicate prevention
▸ Show code
// Add this to a Function node for duplicate prevention
const refundId = $json.refund.id;
const existingRefunds = $('GoogleSheets').all();

... expand to see full code

// Add this to a Function node for duplicate prevention
const refundId = $json.refund.id;
const existingRefunds = $('GoogleSheets').all();

if (existingRefunds.some(row => row.json.refund_id === refundId)) {
  return []; // Skip duplicate
}

return [$json]; // Process new refund

Scaling Beyond 100+ refunds/day+ Records

If your volume exceeds 100+ refunds/day records, apply these adjustments.

1

Batch Refunds to Sheets

Use N8n's 'Wait' node to collect refunds for 5-minute intervals, then write multiple rows at once. This avoids Google Sheets rate limits and reduces API calls by 80%.

2

Add Retry Logic

Wrap the Google Sheets node in an 'If' condition that retries failed writes after 30 seconds. High volume can trigger temporary API errors that resolve with a simple retry.

Going live

Production Checklist

Before you turn this on for real, confirm each item.

Troubleshooting

Common errors and how to fix them.

Frequently Asked Questions

Common questions about this workflow.

Analysis

VerdictWhy n8n for this workflow

Use N8n for this if you want real-time refund tracking without monthly per-task fees. The webhook trigger fires instantly when refunds happen, and you can customize data formatting with Function nodes that Zapier doesn't offer. Skip N8n if your team needs a managed service - you'll spend time maintaining your instance and troubleshooting webhook delivery.

Cost

This workflow uses 1 execution per refund. At 50 refunds/month, that's 50 executions total. N8n self-hosted is free with unlimited executions. N8n Cloud starts at $20/month for 5,000 executions. Zapier would cost $20/month for their Starter plan (750 tasks). Make charges $9/month for 1,000 operations. N8n Cloud wins on cost at moderate volumes.

Tradeoffs

Make has better error handling with automatic retries and detailed failure logs - N8n's error reporting is basic. Zapier offers built-in data formatting for currency and dates without Function nodes. But N8n lets you customize webhook verification and add complex data transformations that both competitors struggle with. You get more control over the entire refund tracking pipeline.

You'll hit Shopify's webhook verification requirements - they send HMAC signatures that need validation to prevent fake data. Google Sheets API has a 100 requests/100 seconds rate limit, so high refund volumes need batch processing. Shopify sometimes sends duplicate webhook payloads during network hiccups, creating duplicate rows unless you add refund ID checking.

Ideas for what to build next

  • Add Weekly Refund Summary EmailsCreate a scheduled N8n workflow that reads your refund tracking sheet weekly and sends summary statistics to management via email with refund trends and top reasons.
  • Connect Refunds to Customer RecordsExtend the workflow to update customer tags in Shopify based on refund history, flagging frequent returners or high-value refunds for special handling.
  • Build Refund Rate AlertsAdd a branch that calculates daily refund rates and sends Slack alerts when refund percentages exceed normal thresholds, catching product or service issues early.

Related guides

Was this guide helpful?
Google Sheets + Shopify overviewn8n profile →