When should you use it?
- You sell online and only notice a chargeback problem when your processor emails you
- Refunds come from several channels and nobody watches the overall rate
- You want an alert that says what to check, not just a number
Not for: Stores without daily sales and refund data you can export; Deciding that a specific customer committed fraud
What do you need, and what do you get?
You need
- An n8n instance
- A Google Sheet with sales rows (date, order ID, amount) and refund rows (date, order ID, type, amount, reason)
- Gemini and Slack credentials
- Your alert threshold, such as two times your normal rate
You get
- A daily log row with the 7-day ratio, baseline and status
- A Slack alert only when the ratio spikes
- A short diagnosis listing plausible causes and the checks to run first
How does it work, step by step?
- Set up the sheetCreate tabs for sales, refunds and a monitor log with the columns the template expects, and fill them from your store or processor export.
- Connect the servicesImport the template, connect Google Sheets, Gemini and Slack, and point each node at your sheet and channel.
- Pick a thresholdStart with the default of two times your 90-day rate and adjust after a few weeks.
- Test with a past spikeUse the date override to replay a week when refunds were known to be high, and check the alert and the log.
- Act on alertsWhen an alert arrives, run its checks against the actual orders and respond to open chargebacks with evidence.
The prompt
The original prompt by WeblineIndia, word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in n8n and Gemini. Values in lime are placeholders.
Original prompt by WeblineIndia
You are a payment-risk monitoring assistant for a small e-commerce seller.
A deterministic monitoring system has already detected an abnormal increase in the refund/chargeback ratio.
Analyze the provided metrics and generate a concise diagnostic summary.
Do not claim that fraud or a fraud ring definitely exists. These are only possible explanations.
Consider possible causes such as:
* payment fraud or unauthorized transactions
* product quality or product defect
* misleading product information
* fulfillment or shipping problems
* customer service problems
* pricing or discount configuration errors
* duplicate or incorrect charges
* unusual customer behavior
Explain which causes appear most plausible based on the available metrics.
Provide:
1. What changed
2. Possible causes
3. Recommended checks/actions
Keep the response concise and practical for a small seller.
Metrics:
Monitoring date: {{ $('Calculate Refund Chargeback Metrics').item.json.monitoringDate }}
7-day sales: {{ $('Calculate Refund Chargeback Metrics').item.json.currentSalesAmount }}
7-day refunds: {{ $('Calculate Refund Chargeback Metrics').item.json.currentRefundAmount }}
7-day chargebacks: {{ $('Calculate Refund Chargeback Metrics').item.json.currentChargebackAmount }}
7-day refund/chargeback ratio: {{ $('Calculate Refund Chargeback Metrics').item.json.currentRatio }}%
90-day historical baseline: {{ $('Calculate Refund Chargeback Metrics').item.json.historicalBaseline }}%
Spike multiplier: {{ $('Calculate Refund Chargeback Metrics').item.json.spikeMultiplier }}x
Current transaction ratio: {{ $('Calculate Refund Chargeback Metrics').item.json.currentTransactionRatio }}%
Historical transaction ratio: {{ $('Calculate Refund Chargeback Metrics').item.json.historicalTransactionRatio }}%
Refund transaction count: {{ $('Calculate Refund Chargeback Metrics').item.json.refundTransactionCount }}
Chargeback transaction count: {{ $('Calculate Refund Chargeback Metrics').item.json.chargebackTransactionCount }}
Do not invent facts that are not present in the metrics.Exactly as published by WeblineIndia in Monitor refund and chargeback ratio spikes with Google Sheets, Gemini, and Slack.
Our adapted version (optional)
Fill in the blanks (optional; the copied prompt uses your values)
A monitoring script has flagged a jump in refunds and chargebacks for {store_name}. It has already done the math; your job is to explain it, not to re-decide it. Last 7 days: sales {sales_7d}, refunds {refunds_7d}, chargebacks {chargebacks_7d}, ratio {ratio_7d}. Usual rate over 90 days: {baseline}. Counts: {refund_count} refunds, {chargeback_count} chargebacks. Recent changes we know about: {recent_changes} In under 150 words: say what moved and by how much, give the two or three most likely explanations and what in the numbers points to each, and list the first three things to check in our order data. Call every cause a possibility. Do not accuse any customer of fraud or add facts that are not above.
What can go wrong?
- The spike decision is made in code, and the model only explains it; keep it that way rather than asking the model to decide.
- A small store can trip the threshold with two or three refunds; set a minimum order count before alerting.
- Possible causes are hypotheses; never accuse a customer or close accounts based on the summary alone.
- Card networks and processors set their own chargeback limits; check your processor's rules for the ratio that actually matters.
Our take
This template gets an important design choice right: the arithmetic and the alert decision happen in plain code, and the model is only asked to explain what changed and suggest checks. That keeps the alert reliable and the explanation useful. The prompt is also careful in the right places, telling the model not to claim fraud and not to add facts beyond the metrics. We ran it word for word on synthetic metrics for a fictional store where the 7-day ratio was 2.75 times its baseline. The answer stated the change in money and in transaction count, noted that both rose together so the problem looked broad rather than one big order, listed product, shipping, billing and fraud explanations as possibilities only, and suggested grouping the 27 refunds and chargebacks by product, date, reason and payment method. It added nothing that was not in the input. For a small store, add a minimum order count so a quiet week does not trigger false alarms.
Where the time goes back: Nobody has to watch refund numbers every day; you hear about a problem the morning it starts, with a short list of where to look.
FAQ
Does the AI decide when to alert?
What does a quiet day look like?
Can I feed it from Shopify or Stripe?
Source and credit
The original prompt on this page is by WeblineIndia, shown word for word with a link to where it was published. The summary, notes and adapted version are ours.
- Original
- Monitor refund and chargeback ratio spikes with Google Sheets, Gemini, and Slack
- Creator
- WeblineIndia
- Published on
- n8n workflow templates
- Original date
- Oct 13, 2026
- License
- Not openly licensed; the original prompt is shown word for word with credit and a link to the original
- Originally for
- n8n
- AI dry run
- Oct 22, 2026: passed. Dry-run tested by our AI test agent on sample input. Model only explained a spike detected in code, as designed.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.