Sync inventory across Shopify, Amazon, Flipkart with Google Sheets and Slack alerts

Go to Workflow
0 views
Built by Rahul Joshi Rahul Joshi
Created on October 19, 2026

Description

Quick overview
This workflow syncs a single inventory count across Shopify, Amazon (SP-API), and Flipkart every 10 minutes using Google Sheets as the inventory master and ledger, then updates channel quantities with a safety buffer and posts low-stock and failure alerts to Slack.

How it works
Runs every 10 minutes on a schedule and reads the last orders cursor from Google Sheets with an overlap window to avoid missing updates.
Loads the Inventory Master, the Processed Lines ledger, and any pending manual stock adjustments from Google Sheets.
Pulls recently updated orders from Shopify via GraphQL, fetches updated Amazon orders and line items via SP-API (using an LWA token), and retrieves Flipkart pre-dispatch and cancelled shipments.
Calculates per-SKU stock movements, deduplicates order lines using the Processed Lines ledger, applies cancellations and queued manual adjustments, and computes a sellable quantity by subtracting each SKU’s safety buffer.
Pushes updated sellable quantities only for changed SKUs (or all SKUs during the nightly full sync) to Shopify inventory, Amazon listing availability, and Flipkart inventory.
Writes updated SKU totals back to the Inventory Master, appends new ledger entries to Processed Lines, marks stock adjustments as applied, and saves the new cursor in Sync State.
Posts Slack alerts for oversold/out-of-stock/low-stock SKUs (including recent sales velocity and days of cover) and sends a separate Slack alert when any channel inventory push fails.

Setup
Create a Google Sheet with tabs named Inventory Master, Processed Lines, Stock Adjustments, and Sync State, and ensure the Inventory Master includes your SKU mappings and channel identifiers (Shopify inventory item/location IDs, Amazon SKU, Flipkart SKU/product/location IDs) plus safety buffer fields.
Add credentials in n8n for Google Sheets, Slack, Shopify Admin API (HTTP Header Auth with X-Shopify-Access-Token), and Flipkart Seller API (HTTP Basic Auth).
In the configuration code, set your Shopify domain, Amazon seller ID, Amazon marketplace ID, Amazon LWA client ID/secret/refresh token for SP-API access, Flipkart location ID, and your full-sync hour.
Update the Google Sheet document ID and Slack channel ID values in the Google Sheets and Slack nodes, then run once manually to validate SKU mappings and initial cursor state before activating the schedule.

This workflow was created by Rahul Joshi and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (4)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Slack
n8n-nodes-base.slack