PREREQUISITES:
- Time: 120s
- Access: Sidekick AI, Flow
- Impact: High
Stop chargebacks in their tracks by automatically canceling high-risk orders while you sleep
Shopify flags fraudulent orders, but it doesn’t automatically stop them from moving through your fulfillment pipeline. If you use external shipping software, a high-risk order can easily slip through the cracks and be shipped before you have a chance to review it.
The Sidekick Solution
We are going to use Shopify Flow to build this automation. Instead of dragging and dropping blocks manually, we are going to give Sidekick an exact blueprint so it can generate the entire workflow for us instantly.
Phase 1: The Setup Requirements
While Shopify Flow has basic native email capabilities, sending formatted, reliable customer-facing emails through Flow requires a dedicated tool.
Before we prompt Sidekick to build the logic, go to the Shopify App Store and install the FlowMail connector app. The best part? It is built directly by Shopify and is 100% free to use. It integrates directly into Shopify Flow as an “Action,” allowing you to send professional cancellation notices without hitting native email limitations or adding another monthly subscription to your bill.
Phase 2: The Exact Prompt
Create a Shopify Flow workflow that automatically protects against high-risk fraudulent orders with these exact specifications:TRIGGER: Order risk analyzedCONDITION: Check if orderRiskLevel == 'HIGH'ACTION 1 - Cancel order:Order ID: {{ order.id }}Reason: FRAUDNotify customer: false (we send custom email instead)Refund: trueRestock: trueStaff note: "Automatically cancelled by Flow due to high fraud risk"ACTION 2 - Send customer email via FlowMail:Customer ID: {{ order.customer.id }}Subject: "Order {{ order.name }} - Security Review Required"Reply-to: [YOUR STORE EMAIL]Email body:"Dear {{ order.customer.firstName }},We regret to inform you that your order {{ order.name }} has been cancelled due to security concerns identified during our fraud prevention review.For your protection and ours, we take security very seriously. If you believe this was done in error, please contact our customer service team.Your payment has been fully refunded and will appear in your account within 5-10 business days.Thank you for your understanding.Best regards,[YOUR STORE NAME]"Workflow name: "Cancel high risk orders automatically"Note: Requires FlowMail connector to be installed for the email action.
copy the above prompt

Phase 3: Review & Customize
Once Sidekick generates the workflow, it will open in your Shopify Flow editor. Before turning it on, you must make a few quick updates:
- Update Placeholders: Click into the FlowMail “Send Email” action block and replace
[YOUR STORE EMAIL]and[YOUR STORE NAME]with your actual store details. - Review the Logic: Double-check that the Condition is set to target exactly “High” risk (and not medium or low).
- Check the Restock: Ensure the “Cancel order” action has the “Restock items” box checked so your inventory stays accurate.
Phase 4: Testing & Activation
Never activate an automation for live traffic without testing it first!
- Turn it On: Click Turn on workflow in the top right corner of the Flow editor.
- The Test: Shopify has a built-in “Bogus Gateway” for testing payments. If you use it to place a test order with a specific “fail” credit card number (which Shopify documents in their help center), it will intentionally flag as high risk.
- Verify: Check your Flow’s “Run history.” You should see the workflow trigger, follow the “High Risk” path, cancel the order, and trigger the FlowMail notification.
FAQ & Troubleshooting: Let Sidekick Fix It
If your workflow doesn’t behave exactly as expected, Shopify Flow will usually give you a specific error message in the “Run history” tab. Here is how to use Sidekick to debug it.
My FlowMail action failed to send!
The Problem: Usually, this means the Liquid variables (like the customer’s email address) weren’t formatted correctly in the FlowMail action block, or the app wasn’t installed properly. Ask Sidekick: “I am using the FlowMail app in Shopify Flow. What is the exact variable I need to type into the ‘To’ field to ensure the email goes to the customer who placed the order?”
The order was canceled, but the items weren’t restocked.
The Problem: If you have multiple fulfillment locations, the “Cancel order” action might not know where to put the inventory back. Ask Sidekick: “My Shopify Flow is canceling high-risk orders, but it is not restocking the inventory. Can you walk me through how to configure the ‘Cancel order’ action in Flow to handle multi-location restocking?”
It’s canceling Medium risk orders too!
The Problem: Your condition logic might be set to “Contains” instead of “Equal to”, or you might have accidentally targeted the wrong risk criteria. Ask Sidekick: “My Shopify Flow is triggering on the wrong risk levels. Can you confirm the exact path in the Flow condition builder to target the final, overall ‘High’ risk recommendation, rather than individual risk flags?”
What other repetitive admin tasks are eating up your week? Drop your biggest operational headaches in the comments below, and let’s see if we can build a Sidekick recipe to automate them.


