Email to Google Sheets
Parse email to a Google Sheet automatically. Give an inbox a unique address, parse each message to JSON, transform the fields, and append a spreadsheet row.
You receive structured emails all day — order confirmations, inbound leads, contact-form notifications, monitoring digests, scheduled reports — and you want each one captured as a row in Google Sheets. Copy-pasting is tedious, and reaching for Zapier or a hosted email-parsing SaaS is overkill for something this mechanical.
Webhook Relay does it directly. Add an email input to a bucket and you get a unique address. Every message sent there is parsed to JSON, optionally reshaped by a transform, and delivered to a destination that appends a spreadsheet row. No polling, no glue server, no IMAP.
How it works
The whole pipeline is a single hop:
inbound email ──▶ Webhook Relay ──▶ Apps Script Web App ──▶ appendRow ──▶ Google Sheet
(any sender) (parse + transform) (doPost endpoint) (one row) (in your sheet)
Webhook Relay receives emails as webhooks: you get a unique address like <uuid>@in.webhookrelay-mail.com, each email is parsed into a structured JSON document, and that document is POSTed to your bucket outputs. A small transform function picks the columns you care about, and a Google Apps Script Web App writes the row.
The parsed payload includes everything you'd want as a column:
{
"from": "[email protected]",
"from_name": "Alice",
"recipient": "[email protected]",
"to": ["[email protected]"],
"cc": [],
"subject": "Order #4821 confirmed",
"date": "2026-06-28T11:59:00Z",
"message_id": "<...>",
"text": "Plain-text body...",
"html": "<p>HTML body...</p>",
"headers": {},
"spf": "pass",
"dkim": "pass",
"dmarc": "pass",
"attachments": []
}
See the full payload reference for every field.
Step 1: Create a bucket and add an email input
In the dashboard, create a bucket, then add an email input to it. Webhook Relay generates a unique address:
[email protected]
Anything sent to that address is parsed and forwarded to the bucket's outputs. Set up forwarding to that address from your provider, or use it directly as the destination on your forms and order system.
Step 2: Deploy a Google Apps Script Web App
Create a Google Sheet, open Extensions → Apps Script, and replace the default code with a doPost(e) handler that appends a row:
function doPost(e) {
const sheet = SpreadsheetApp.openById("YOUR_SHEET_ID").getSheets()[0];
const email = JSON.parse(e.postData.contents);
sheet.appendRow([
email.date || new Date(),
email.from,
email.subject,
email.text,
]);
return ContentService
.createTextOutput(JSON.stringify({ status: "ok" }))
.setMimeType(ContentService.MimeType.JSON);
}
Click Deploy → New deployment, choose Web app, set Execute as: Me and Who has access: Anyone, then deploy and copy the Web app URL. It looks like https://script.google.com/macros/s/AKfyc.../exec. Re-publish a new version whenever you change the script.
Step 3: Add the Web App URL as a bucket output
Back in Webhook Relay, add an output to your bucket and paste the Apps Script Web app URL as the destination. Now every parsed email is POSTed there and appended as a row.
Step 4 (optional): Transform to pick columns
The parsed email JSON carries far more than you probably want in a spreadsheet. Attach a transform function to the output to reduce it to exactly the columns you'll write:
const e = JSON.parse(r.body);
r.setBody(JSON.stringify({ date: e.date, from: e.from, subject: e.subject, body: e.text }));
This keeps the four fields the Apps Script reads and drops the rest — headers, HTML, auth results — so the row stays clean. Adjust the keys here and the appendRow([...]) call together to capture whatever you need.
Step 5: Send a test email
Send a message to your @in.webhookrelay-mail.com address. Within a second or two a new row — date, from, subject, body — appears in your sheet. If nothing shows up, open the bucket's request log to see exactly what was received, parsed, and delivered.
Going further
Fan out to other automation. If you'd rather not use Apps Script, point the output at any other endpoint that appends rows — a serverless function, an n8n/Make webhook, or your own API. The parsed JSON is the same; only the destination changes.
Forward only some senders. You don't have to log everything. Use input filtering and policy to accept mail only from trusted senders or domains and drop the rest before parsing.
Capture more columns. Add fields in both the transform body and the appendRow([...]) call — recipient, message IDs, SPF/DKIM/DMARC results — to build a richer log straight from your inbox.
This is one of Webhook Relay's Email to Webhook recipes: give any inbox a programmable address, parse each message to JSON, and route it anywhere. Google Sheets is just one destination — the same pattern delivers parsed email to a database, a chat channel, or an internal API.
Get started
Create a free Webhook Relay account, add an email input to a bucket, and turn your inbox into a spreadsheet in a few minutes.
