Every new order, lead or receipt arrives as an email that looks the same as the last one:
New order received
Order number: A-1042
Customer name: Ana López
Email: ana@example.com
Total: $1,249.50
Copying those fields into a spreadsheet by hand gets old fast. Email-parser services do it for a monthly fee. This guide does it for free with Gmail to Sheets, an MIT-licensed Apps Script that runs in your own Google account.
Create a Google Sheet and type the column names in row 1. The names are the setup. For the email above, the sheet ends up like this:
| Date | Subject | Order number | Customer name | Total | |
|---|---|---|---|---|---|
| (filled in) 10/19/2026 9:14 | New order | A-1042 | Ana López | ana@example.com | $1,249.50 |
Date, From, To, Subject, Body and Link are filled from the email itself.Order number, the script finds the line starting “Order number:” and takes what follows. It also handles “Order number - A-1042”, and emails laid out as tables where the value is on the next line.Code.gs with this Code.gs and click Save.from:orders@shop.com subject:"New order". Add newer_than:30d if you don’t want old ones.Matching emails are imported right away, one row each, and the script checks for new ones every hour. Each imported email gets the Gmail label sheets-imported, so it’s never imported twice.
When a value isn’t on a “Label: value” line, write a regular expression between slashes as the column name. The part in parentheses is kept:
| Column name | Pulls out |
|---|---|
/Total: \$([\d.,]+)/ |
1,249.50 from “Total: $1,249.50” |
/Tracking: (\w+)/ |
the tracking code |
/#(\d{4,})/ |
the first number of 4+ digits after a # |
From, Date, /Total:? \$?([\d.,]+)/.Date, Subject, Link.Does my computer need to be on? No. It runs on Google’s servers every hour. Use Import Now for an immediate run.
Can I re-import an email? Remove the sheets-imported label from it in Gmail, then run Import Now.
How do I stop it? 📧 Gmail to Sheets → Turn Off.
What about CSV attachments? Use Gmail CSV to Sheets, which imports the attachment’s rows.