E-commerce & Dropshipping · n8n

Email Order Parser: turn messy order confirmation emails into a clean orders spreadsheet

An n8n workflow that watches your inbox for order confirmation emails from any marketplace, has Claude extract the order number, items, amounts, and shipping address into strict JSON, and appends every order as a clean row in Google Sheets.

difficulty Beginnersetup 30 minresult Every order email becomes a structured spreadsheet row within a minute✓ Tested · July 4, 2026
  1. 1

    Watch the inbox for order emails

    Add a Gmail Trigger node polling every minute with the search filter subject:(order OR confirmation) newer_than:1d. Connect your Google account as an n8n credential. If your orders arrive at a dedicated address like orders@yourstore.com, filter on to: instead — fewer false positives.

  2. 2

    Let Claude extract the order fields

    Add an HTTP Request node to the Claude API (/v1/messages). Pass the email subject and plain-text body. System prompt: extract order_id, marketplace, customer_name, items (array of name + qty + price), total, currency, and shipping_address — respond with JSON only, and use null for anything not present in the email. Marketplaces all format their emails differently; this one prompt replaces a pile of brittle regexes.

  3. 3

    Parse and flatten the JSON

    Add a Code node that parses Claude's JSON response, drops anything without an order_id (newsletters that slipped through the filter), and flattens the items array into a single items_summary string like 2x Phone Case, 1x Charger so it fits one spreadsheet cell.

  4. 4

    Append to the orders sheet

    Add a Google Sheets node in append mode: date, marketplace, order ID, customer, items summary, total, currency, shipping address. From now on 'let me check my orders' means opening one sheet — not digging through three inboxes.

Frequently asked questions

What does this cost per order?

One Claude API call per order email — a fraction of a cent each, so even 500 orders a month stays under $2. Gmail and Google Sheets are free. The only fixed cost is n8n cloud ($24/mo) if you don't self-host.

Will it work with Outlook instead of Gmail?

Yes — swap the Gmail Trigger for n8n's Microsoft Outlook Trigger and keep the rest of the flow identical. The Claude extraction step doesn't care where the email text comes from.

What happens with emails that aren't really orders?

Two safety nets: the Gmail search filter catches most noise up front, and Claude is instructed to return order_id: null for anything that isn't an order confirmation — the Code step then drops those rows silently. Worst case a stray newsletter costs you one API call, not a junk row in the sheet.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.