What Shopify Flow + Analytics Can Do (New in 2025)
For years, Shopify analytics were passive. You logged in, ran a report, made a decision. You had to be the one checking your data every morning. Then in late 2025, Shopify added the "Get Analytics Data" action to Flow - and everything changed.
This new action lets you write ShopifyQL queries directly inside automation workflows. Your data can now check itself. When inventory dips below a threshold, Flow knows. When sales drop unexpectedly, Flow is already alerting you. When a product breaks into your top sellers, Flow can tag it automatically.
This is the bridge between "check your analytics" and "let your analytics check you." It's small in feature scope, but enormous in practical impact.
- Query any ShopifyQL data source inside a Flow workflow
- Use query results as variables in conditions and downstream actions
- Trigger alerts, tags, emails, or Slack messages based on analytics
- Remove the need for manual data pulls and recurring reports
- Chain queries together - one workflow can make decisions across multiple data sources
Before this feature, if you wanted to "tag products that hit $10K in revenue last month," you'd have to run a monthly report by hand, copy the SKUs, and bulk-edit your product tags. Now you can set it and forget it - Flow does the work for you.
5 Flow + Analytics Workflows You Can Build Today
Theory is useful. Examples are better. Here are five real workflows you can build and deploy in the next hour - no custom code required, just Flow + ShopifyQL.
The problem: Stockouts cost you revenue. You need to know when inventory is low before customers see "out of stock."
The workflow:
- Trigger: Scheduled (daily at 8am UTC)
- Get Analytics Data: Query all variants with inventory below your reorder point (e.g.,
inventory_quantity < 10) - Condition: If query returns results, proceed
- Action: Send Slack message to #operations with product name, SKU, current stock, and reorder quantity
Your ops team wakes up to a single message listing all low-stock items. No dashboard login needed. No mental math. Flow just gave you 5 minutes back every morning.
The problem: Your team needs a quick pulse on how last week went - revenue, orders, AOV - without opening the dashboard.
The workflow:
- Trigger: Scheduled (Monday 9am)
- Get Analytics Data: Query
SELECT SUM(revenue), COUNT(*), AVG(order_value) FROM orders WHERE date >= NOW() - INTERVAL 7 DAYS - Format and send: Use query results in a Slack message: "Last week: $X revenue | Y orders | $Z AOV"
Now your entire team sees the same number at the same time. No Slack arguments about "I thought we did $50K last week." The data is the source of truth.
The problem: Your top products change weekly. Manually updating tags is tedious and slow. You want your top 10 sellers always tagged so merchandising, marketing, and fulfillment teams see them instantly.
The workflow:
- Trigger: Scheduled (weekly, Friday evening)
- Get Analytics Data: Query top 10 products by units sold in past 30 days
- Loop over results: For each product, update tags
- Add tag "best-seller" to products in the top 10
- Remove tag "best-seller" from products no longer in the top 10
Your best sellers are always marked in Shopify. Marketing can build campaigns faster. Fulfillment knows what to pre-stage. Inventory knows what to keep stocked.
The problem: A marketing campaign bombs. Your traffic drops 50% in an hour. By the time you check your dashboard mid-afternoon, you've lost $3K in revenue. You needed to know immediately.
The workflow:
- Trigger: Scheduled hourly (9am - 6pm UTC)
- Get Analytics Data: Query sessions in past 3 hours vs same period last week
- Condition: If week-over-week decline > 40%, proceed
- Action: Send urgent Slack alert to #marketing: "⚠️ Traffic down 45% vs last week | 230 sessions (vs 420 expected) | Check campaigns"
Your marketing team gets a page within an hour. They can pause the campaign, debug the creative, or roll back the pricing change before the day is gone.
The problem: Someone uses the same discount code 8 times in a day. Fraud? Testing? Either way, you want to know.
The workflow:
- Trigger: Scheduled daily
- Get Analytics Data: Query orders by discount code, count per customer, identify customers with >3 uses of same code in 24h
- Condition: If results found, proceed
- Action: Tag customer "review-discount-usage" + send ops team alert
Your fraud / ops team reviews the flagged customers. Some might be legitimate (bulk buy for resale), but most are worth investigating. You caught it in 24 hours instead of finding out at month-end reconciliation.
Setting Up Your First Analytics Flow
Ready to build? Here's the step-by-step to set up your first workflow. We'll use the inventory reorder alert as the example.
Go to Shopify Admin → Settings → Apps and integrations → Flow. Click Create Flow. Choose "Start from scratch."
Click the blue + button. Search for "Scheduled" and select "Scheduled: Daily at a specific time." Set it to 8:00 AM UTC.
Click another + button to add an action. Search for "Get Analytics Data" and select it. You'll see a ShopifyQL editor.
Paste this query (adjust the threshold from 10 to your reorder point):
This query finds all variants with fewer than 10 units in stock, groups them by product, and sorts them by stock level (lowest first).
Click + again. Choose "Condition." Set it to: "If Get Analytics Data returned results, then..." This prevents you from sending an empty Slack message on days when all inventory is fine.
Inside the condition, click + and search for "Send message to Slack." Set the channel to #operations. In the message field, use the variables from your query:
Flow will loop through each result and send one message per low-stock item.
Click "Test flow" in the top right. If your store has any low-stock items, you'll see a message sent to Slack. If the test looks good, click "Turn on flow" and you're live. Tomorrow at 8am, it runs automatically.
ShopifyQL Query Examples
ShopifyQL is Shopify's SQL-like language for querying analytics data. Here are common queries you'll need for Flow automations. Drop these into the "Get Analytics Data" action and modify them for your use case.
Tips for Running Analytics Flows in Production
Always add a condition after your "Get Analytics Data" action. If your query returns no results, you don't want to send an alert. Use "If Get Analytics Data returned results" to gate your downstream actions.
ShopifyQL uses UTC by default. If your business operates in a different timezone (e.g., PST), add a timezone offset in your query or schedule your flows accordingly. A 9am PT alert means a 5pm UTC trigger.
Every Flow run is logged in your admin. Go to Settings → Apps and integrations → Flow and click your flow to see run history. If something goes wrong, check the logs - they show you the query result and any errors.
Running the same query every 15 minutes drains API quota unnecessarily. If something doesn't need real-time alerts, schedule it daily or weekly. Reserve hourly queries for truly urgent signals (like traffic drops or security flags).
Use Flow's test feature before turning on a flow. Make sure your ShopifyQL query returns what you expect and that the downstream action (Slack, email, tag update) fires correctly.
What Flow + Analytics Can't Do (Yet)
Flow + ShopifyQL is powerful, but it has boundaries. Know them so you can plan workarounds or choose different tools when needed.
- No complex joins: You can't join orders to customer data in a single query. Multi-table joins aren't supported.
- No ML predictions: Can't query "predict churn risk" or "anomaly score." ShopifyQL is for historical data only.
- Read-only: Flow can read analytics data but can't write back to the analytics system. You can update product tags, send Slack messages, but not create new data sources.
- Limited scheduling: Flow triggers on events or schedules. You can't say "alert me if X changes" in a reactive way. All analytics flows are time-based (hourly, daily, weekly).
- No error recovery: If a ShopifyQL query fails (bad syntax, timeout), the entire flow stops. There's no automatic fallback or retry logic.
For production-grade monitoring: Niblin provides 47+ anomaly detection rules that run continuously without manual setup. If you need predictive alerts, cross-domain context (revenue + marketing + customers), or deterministic root cause analysis, Flow + ShopifyQL is a good starting point, but Niblin is designed for the gaps Flow can't fill.
Key Takeaways
- Shopify Flow's "Get Analytics Data" action lets you query ShopifyQL inside automation workflows - making your data proactive instead of passive.
- Five practical workflows: inventory reorders, weekly sales snapshots, auto-tagging best sellers, traffic drop alerts, and discount abuse detection.
- Setup is no-code: create a Flow, add a schedule trigger, write a ShopifyQL query, add a condition, and connect to Slack or other actions.
- ShopifyQL syntax is SQL-like; common queries for sales, products, sessions, and customers can be copy-pasted and customized.
- Flow works for recurring analytics tasks, but has limits: no complex joins, no ML predictions, no event-driven triggers. For deterministic anomaly detection and cross-domain insights, purpose-built tools fill the gaps.
Frequently Asked Questions
What's the difference between Shopify Flow and Shopify Automation?
Flow is the newer, more powerful system. Automation is the legacy tool and is being phased out. Use Flow for all new workflows.
Can I run a ShopifyQL query more than once per hour?
Flow's scheduled trigger supports hourly as the minimum interval. For sub-hourly queries, you'd need a third-party integration or custom app using the GraphQL API directly.
What happens if my ShopifyQL query fails?
The entire Flow stops. There's no automatic retry. Check your query syntax in the Flow logs. ShopifyQL has strict syntax - use the Shopify documentation to debug.
Can I loop through query results in Flow?
Yes. Flow has a "Loop over list" action. After your "Get Analytics Data" action, add a Loop to iterate through each row and perform actions on them (like tagging products or sending individual Slack messages).
Is there a limit to how many rows a query can return?
ShopifyQL queries are limited to 1,000 rows by default. For larger result sets, use LIMIT and OFFSET in your query to paginate or filter more specifically.
Can I save a Flow as a template to reuse?
Not directly in the UI yet, but you can duplicate a Flow in your admin and modify the query. This is the closest thing to a template.
By