Personal Project

E-commerce Automation · Shopify Order Sync

DeskNest Commerce — Shopify Order Synchronization & Profit Dashboard

DeskNest Commerce needed a simple way to bring Shopify order information into one Google Sheets dashboard. I built an n8n workflow that retrieves orders, calculates estimated profit, and keeps the spreadsheet in sync — without creating duplicates or overwriting manually maintained fields.

Note: Self-directed simulation — DeskNest Commerce is a fictional business; product costs, prices, and orders are simulated. This is a portfolio project, not paid client work.

Shopify

n8n

Google Sheets

Shopify Admin API

Discord

The Challenge

DeskNest Commerce had no system connecting Shopify to its spreadsheet-based order dashboard. Staff manually copied order details, which led to duplicate rows, outdated payment and fulfillment statuses, and no visibility into product cost or profit per order. Manual fields like "Shipping Agent Paid?" and internal notes also risked being overwritten every time the sheet was refreshed by hand.

The Solution

I built an n8n workflow that runs on a daily schedule, pulls orders from Shopify's Admin API (including archived orders), splits them into individual records, and calculates estimated COGS and profit using a simulated SKU-to-cost mapping. Google Sheets' Append or Update Row matches on Shopify Order ID, so repeat runs update existing rows instead of duplicating them — and the sync skips the manually maintained "Shipping Agent Paid?" and "Internal Notes" columns entirely. A second workflow listens for failures and posts a notification to Discord.

The Results

✦ Duplicate-safe synchronization

Google Sheets' Append or Update Row matches on Shopify Order ID, so re-running the sync never creates duplicate rows — verified across repeated runs.

✦ Manual fields stay protected

"Shipping Agent Paid?" and "Internal Notes" are excluded from the automated mapping, so staff-entered values survive every sync.

✦ Estimated profit per order

COGS and estimated profit are calculated automatically from a simulated SKU-to-cost mapping, with unmapped SKUs flagged for review instead of guessed at zero cost.

✦ Fulfillment status stays current

Payment and fulfillment status pull straight from Shopify on each run, so the dashboard reflects reality without manual re-entry.

✦ Archived orders included

The default Shopify node didn't return archived orders. Switching to a custom HTTP Request with status=any fixed retrieval — the reason the final architecture uses a direct API call instead of the built-in Shopify node.

How It's Built

This section is for the technically curious. If you just care about the results, you’ve already seen them above.

Trigger

Schedule Trigger (runs daily) → n8n

Data source

Shopify Admin API via a custom HTTP Request (status=any, so archived orders are included)

Processing

Split Out → Edit Fields: one record per order, with COGS and estimated profit from a simulated SKU-to-cost mapping

Database

Google Sheets — Append or Update Row, matched on Shopify Order ID

Data safety

Manual columns (“Shipping Agent Paid?” and “Internal Notes”) are left out of the mapping; unknown SKUs are flagged for review

Error handling

Separate workflow: Error Trigger → Discord notification when a run fails

Key engineering decisions

Order ID as the matching key

Using Shopify Order ID as the Google Sheets matching column means the same order can sync dozens of times without ever producing a duplicate row.

Protecting manually maintained fields

The automated field mapping simply omits "Shipping Agent Paid?" and "Internal Notes" — the safest way to guarantee automation never silently overwrites a human's input.

Treating unknown SKUs as “Review,” not zero cost

When a line-item SKU isn't in the cost mapping, the workflow leaves COGS and profit blank and flags the row instead of defaulting to a $0 cost that would quietly inflate profit.

A Note from the Builder

This project pushed me to think about data integrity more than automation itself. It's easy to sync data — it's harder to make sure a sync never corrupts something a human typed in by hand. Making sure "Shipping Agent Paid?" and internal notes survive a re-sync, and that an unknown SKU shows up as "needs review" instead of a silently wrong $0 profit, mattered more to me than the Shopify API call itself.

Workflow Screenshots

Main synchronization workflow
Main synchronization workflow· 1 / 2

Create a free website with Framer, the website builder loved by startups, designers and agencies.