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.
- 1
Watch the inbox for order emails
Add a
Gmail Triggernode polling every minute with the search filtersubject:(order OR confirmation) newer_than:1d. Connect your Google account as an n8n credential. If your orders arrive at a dedicated address likeorders@yourstore.com, filter onto:instead — fewer false positives. - 2
Let Claude extract the order fields
Add an
HTTP Requestnode to the Claude API (/v1/messages). Pass the email subject and plain-text body. System prompt: extractorder_id,marketplace,customer_name,items(array of name + qty + price),total,currency, andshipping_address— respond with JSON only, and usenullfor anything not present in the email. Marketplaces all format their emails differently; this one prompt replaces a pile of brittle regexes. - 3
Parse and flatten the JSON
Add a
Codenode that parses Claude's JSON response, drops anything without anorder_id(newsletters that slipped through the filter), and flattens the items array into a singleitems_summarystring like2x Phone Case, 1x Chargerso it fits one spreadsheet cell. - 4
Append to the orders sheet
Add a
Google Sheetsnode 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.