Email parser for n8n
To use ParsedMail as an email parser for n8n, add a Webhook node with the HTTP method set to POST, copy its production URL and add it as a webhook endpoint in ParsedMail. Every parsed email then starts the workflow with typed fields, per-field confidence and a review flag.
Why n8n and ParsedMail work well together
n8n gives you a workflow engine you can run in its cloud or on your own server. ParsedMail gives it clean input: each email is read against a typed schema, and the result is posted to the n8n Webhook node as JSON. There is no ParsedMail node to install. The built-in Webhook node is enough, and the HTTP Request node covers the REST API when you need it, as described on the email parsing API page.
If you self-host n8n, the webhook URL must be reachable over https on a public host, on port 443 or 8443. ParsedMail does not deliver to private addresses and does not follow redirects.
Configure the Webhook node
- Add a Webhook node and set HTTP Method to
POST. Give it a readable path such asparsedmail-orders. - Set Respond to Immediately, so ParsedMail gets its 2xx answer before the rest of the workflow runs. Deliveries time out after 15 seconds.
- Copy the Test URL, add it as an endpoint under Webhooks in ParsedMail and click Listen for test event.
- Press Send test event in ParsedMail or forward a typical email to the inbox.
- When the flow works, activate it and swap the endpoint in ParsedMail to the Production URL.
Reading the fields in expressions
The Webhook node puts the request body under body. The event wraps the email object in data, and your extracted fields sit in the email object's own data key:
{{ $json.body.data.data.order_number }}
{{ $json.body.data.data.total.amount }}
{{ $json.body.data.confidence_avg }}
{{ $json.body.data.needs_review }}
{{ $json.body.data.from.email }}Table fields such as line items are arrays. Use a Split Out node on body.data.data.products to get one item per row. Missing values are null.
Branch on confidence with an If node
After the Webhook node, add an If node. A boolean condition on {{ $json.body.data.needs_review }} is false follows the inbox threshold (0.80 by default). A number condition on {{ $json.body.data.confidence_avg }} greater than or equal to 0.9 sets a stricter bar for this workflow. Send the true branch to your system of record and the false branch to a Slack message.
On Growth and Scale the review queue holds low-confidence emails inside ParsedMail until a reviewer approves them, and the webhook then carries the corrected values.
Verify the signature in the workflow
Each request has a ParsedMail-Signature header in the form t=<unix time>,v1=<hex>. The v1 value is an HMAC-SHA256 of <t>.<raw body> with the endpoint secret (whsec_...).
- In the Webhook node options, enable Raw Body so the exact bytes are kept.
- Add a Crypto node with the HMAC action, SHA256, your secret as the key and the string
t, a dot and the raw body as the value. - Compare the result with
v1in an If node, and reject timestamps older than 5 minutes.
The webhook documentation shows the same check in code.
Example workflows
- Bookings to Airtable: Webhook, If, Airtable Create. See booking email parsing.
- Orders to Google Sheets: Webhook, Split Out on line items, Google Sheets Append Row.
- Leads to HubSpot: Webhook, HubSpot Create or Update Contact, Slack Send Message.
Duplicates are handled before n8n sees them: an email with the same Message-ID, or the same sender, subject and body within 30 days, gets status duplicate and no webhook. Retries reuse the same Idempotency-Key, so a Remove Duplicates node or a lookup can drop repeats.
Frequently asked questions
Does this work with self-hosted n8n?
Is there a ParsedMail node for n8n?
Can n8n fetch parsed emails instead of receiving them?
GET /api/v1/emails?status=delivered&since=... on a schedule with an API key that has the read scope. The rate limit is 120 requests per minute per workspace.
What happens if my n8n instance is down?
Related
See your own email as JSON
Paste one into the demo, describe the fields and look at the result. No account needed.