Detect dead Shopify inventory and send Gmail + Slack CSV alerts

Go to Workflow
0 views
Built by Tricore Infotech Pvt Ltd Tricore Infotech Pvt Ltd
Created on June 08, 2026

Description

Quick overview
This workflow runs daily to detect dead Shopify inventory by comparing current product stock against recent paid order history, then generates a CSV report and sends it via Gmail and Slack, with global error notifications posted to Slack.

How it works
Runs every day at 07:00 on a schedule trigger.
Pulls paid Shopify orders from the past configured lookback period and fetches all published Shopify products.
Compares product variants with available stock against order history to find variants that have not sold within the configured number of days, then sorts results by total inventory value.
Stops after producing a “clean” status message if no dead inventory is found.
Formats the dead-inventory list into CSV-ready rows and converts it into a CSV file.
Emails the CSV report through Gmail to the configured recipient and uploads the same CSV file to the configured Slack channel.
Posts any workflow execution errors to Slack with the failed node name and error message.

Setup
Connect Shopify OAuth2 credentials with permission to read orders and products.
Connect a Gmail OAuth2 account that can send email from the Gmail node.
Connect Slack credentials and set the target channel ID for both the report upload and error notifications.
Update the detector settings for your store (daysWithoutSales, orderFetchDays, recipientMail, and slackEscalationChannel) before activating the workflow.

Requirements
Shopify store with Admin API access (read orders and read products scopes).
Gmail account connected via OAuth2.
Slack workspace with a designated channel for reports.

Nodes Used (4)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Shopify
n8n-nodes-base.shopify
Slack
n8n-nodes-base.slack