Mailparser and Parseur Alternative: Incoming Email as JSON on a Webhook

A Mailparser and Parseur alternative: incoming mail as JSON on a signed webhook, parsed by your own TypeScript or Python code or an agent.

By · · 15 min read

A TypeScript parse function that turns an order confirmation email into a JSON record

Mailparser and Parseur both turn incoming email into data. You forward mail to an address they give you, describe the fields you want in their app, and the extracted values go out to a webhook, a spreadsheet or Zapier. If your team pays for that today and has developers on hand, there is another way to get the same result: receive the mail on Mailcycle as structured JSON, and keep the parsing rules in your own repository, where they are versioned, reviewed and tested like the rest of your code.

This guide builds that in TypeScript and Python, shows the no-code route for n8n and Zapier, and ends with an AI agent doing the extraction. Every statement about Mailparser and Parseur comes from their own pages, read on 29 November 2026; the sources table at the end lists the page for each one.

How Mailparser and Parseur work today

Mailparser: rules built in the app

Mailparser asks you to forward mail to your private @mailparser.io inbox, then “create parsing rules to isolate the data that you want to export”. Its template library covers common senders such as shipping notices and lead sources, a drag-and-drop editor builds custom rules, and a Parsing Assistant service sets up an inbox from your sample emails for $99 per layout. Parsed data leaves through about 80 named integrations, Zapier among them, or an HTTP webhook that sends JSON, XML or form fields.

Parseur: templates and an AI engine

Parseur generates a mailbox with a random address when you create one. You then either build a template for each document layout or name the fields in plain English for its AI engine, and the help pages say Parseur tries a matching template first and falls back to AI. Each processed document costs credits: an email is one page, and an attached PDF costs one credit per page, so an email with one PDF attached counts as two documents. Parsed fields reach your URL as a JSON POST, with up to five retries over roughly 55 minutes.

Both products sell the parsing itself. Mailcycle hands you the parsed email and leaves the extraction to code you own.

The Mailcycle model: structured mail in, your parser decides

On Mailcycle, an incoming email is stored at its address and encrypted the moment it arrives. A message.received event goes to your webhook with the message id and the address id. Your code reads the message by id, and the SDK returns it as one object with from, fromName, replyTo, to, subject, text, html, safeHtml, messageId and an attachments list with filename, mime type and size for each file. That object is already the email as JSON.

Flow: mail arrives at an address created by API, a signed message.received event reaches your receiver, the SDK reads the message as JSON, and your parse function writes the record
The webhook says where the mail is, and your own function decides what it means.

What you gain by moving the rules into code:

  • Rules in version control. A change to how an invoice total is read is a pull request with a diff, a review and a history, not an edit in someone’s dashboard.
  • Tests on real samples. Save a few real emails as fixtures and your test suite proves the parser still works before a deploy.
  • Any logic you can write. Lookups against your own database, currency conversion, fuzzy matching on customer names, or a call to a model for the hard cases.
  • One price per message. Mailcycle counts a received message once, whatever it has attached, and the parsing runs on your own servers.

An address for each source, created by API

Parsing gets simpler when every sender has its own address, because the address tells your code which parser to run. On Operator you create up to 250 addresses, each with one API call:

// provision.ts
import { Mailcycle } from 'mailcycle-sdk';

const mc = await Mailcycle.withApiKey({
  apiKey: process.env.MAILCYCLE_API_KEY!,
  phrase: process.env.MAILCYCLE_PHRASE!,
});

for (const source of ['shop-orders', 'supplier-invoices', 'lead-forms']) {
  const address = await mc.addresses.create({ prefix: source, label: source, retentionDays: 90 });
  console.log(source, address.id, address.emailAddress);
}

The server adds a short random ending to the prefix, so shop-orders becomes an address such as shop-orders-q4m8@ on a shared Mailcycle domain, receiving as soon as the call returns. Set the shop’s notification address, or a Gmail or Outlook forwarding rule, to it. Store the three address ids in your config: they are the routing table for the receiver below.

Parse incoming email to JSON in TypeScript

The parse function, kept apart from the webhook

Write the extraction as a pure function from a message to a record. It knows nothing about HTTP, so it is easy to test:

// parse-order.ts
import type { Message } from 'mailcycle-sdk';

export interface Order {
  orderId: string;
  total: number;
  currency: string;
  customerEmail: string;
  items: { name: string; quantity: number }[];
  receivedAt: string;
}

const ORDER_ID = /Order\s*#\s*([A-Z0-9-]{4,})/i;
const TOTAL = /Total[:\s]+([£$€])\s*([\d,]+\.\d{2})/i;
const ITEM = /^\s*(\d+)\s*x\s+(.+?)\s*$/gim;
const CURRENCIES: Record<string, string> = { '£': 'GBP', $: 'USD', '€': 'EUR' };

export function parseOrder(message: Message): Order | null {
  const body = message.text;
  const id = body.match(ORDER_ID) ?? message.subject.match(ORDER_ID);
  const total = body.match(TOTAL);
  if (!id || !total) return null;

  return {
    orderId: id[1],
    total: Number(total[2].replace(/,/g, '')),
    currency: CURRENCIES[total[1]],
    customerEmail: message.replyTo,
    items: [...body.matchAll(ITEM)].map((m) => ({ quantity: Number(m[1]), name: m[2] })),
    receivedAt: message.receivedAt,
  };
}

Returning null for mail that doesn’t match is deliberate. The receiver can then file it for a person to look at, instead of writing a half-filled row.

The webhook receiver

// server.ts
import express from 'express';
import { verifyWebhookSignature } from 'mailcycle-sdk';
import { mc } from './client';
import type { Message } from 'mailcycle-sdk';
import { parseOrder } from './parse-order';
import { saveOrder, saveUnparsed, alreadyHandled } from './db';

const PARSERS: Record<string, (message: Message) => object | null> = {
  [process.env.SHOP_ORDERS_ADDRESS_ID!]: parseOrder,
};

const app = express();

app.post('/inbound', express.text({ type: 'application/json' }), async (req, res) => {
  const ok = await verifyWebhookSignature(process.env.MAILCYCLE_WEBHOOK_SECRET!, req.body, req.get('Mailcycle-Signature'));
  if (!ok) return res.status(401).end();

  const event = JSON.parse(req.body);
  res.status(204).end();
  if (event.type !== 'message.received' || (await alreadyHandled(event.id))) return;

  const message = await (await mc()).messages.get(event.payload.messageId);
  const parse = PARSERS[event.payload.inboxId];
  const record = parse?.(message);
  if (record) await saveOrder(event.id, record);
  else await saveUnparsed(event.id, message.id, message.subject);
});

app.listen(3000);

The inboxId in the event picks the parser, so one receiver serves every source. express.text keeps the body exactly as it was signed, which the signature check needs. The mc() helper, deduplication on the event id and the background-job pattern are covered once in the hub post, Receive email with a webhook, so they are not repeated here.

Testing the parser on saved emails

// parse-order.test.ts
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { parseOrder } from './parse-order';

test('reads an order confirmation from the shop', () => {
  const message = JSON.parse(readFileSync('fixtures/order-1042.json', 'utf8'));
  assert.deepEqual(parseOrder(message), {
    orderId: '1042',
    total: 84.5,
    currency: 'GBP',
    customerEmail: 'jo@example.com',
    items: [{ quantity: 2, name: 'Linen tea towel' }, { quantity: 1, name: 'Oak board' }],
    receivedAt: '2026-11-29T09:14:03.000Z',
  });
});

To make a fixture, fetch a real message once and write JSON.stringify(message, null, 2) to a file. When the shop changes its template, the failing test tells you before the wrong totals reach your books.

Parse email attachments in Python

Reading a CSV from a supplier

Many parsing jobs are really attachment jobs: a supplier sends a daily stock report or a remittance file. The Python SDK returns the attachment bytes already opened, and the standard library does the rest:

# parse_stock.py
import csv
import io
import os
from dataclasses import dataclass

from mailcycle import Mailcycle, Message

mc = Mailcycle.with_api_key(os.environ["MAILCYCLE_API_KEY"], phrase=os.environ["MAILCYCLE_PHRASE"])


@dataclass
class StockRow:
    sku: str
    quantity: int
    supplier: str


def parse_stock(message: Message) -> list[StockRow]:
    rows: list[StockRow] = []
    for file in message.attachments:
        if not file.filename.lower().endswith(".csv"):
            continue
        data = mc.messages.attachment(message, file.index).decode("utf-8-sig")
        for line in csv.DictReader(io.StringIO(data)):
            rows.append(StockRow(sku=line["SKU"].strip(), quantity=int(line["Qty"]), supplier=message.from_address))
    return rows

The same shape works for spreadsheets with openpyxl, for PDFs with pdfplumber, or for XML with xml.etree. Whatever library you already trust reads the file inside your own process.

A Flask receiver

# app.py
import json
import os

from flask import Flask, request
from mailcycle import verify_webhook_signature

from parse_stock import mc, parse_stock
from store import already_handled, save_rows

app = Flask(__name__)


@app.post("/inbound")
def inbound():
    raw = request.get_data()
    if not verify_webhook_signature(os.environ["MAILCYCLE_WEBHOOK_SECRET"], raw, request.headers.get("Mailcycle-Signature")):
        return "", 401
    event = json.loads(raw)
    if event["type"] == "message.received" and not already_handled(event["id"]):
        message = mc.messages.get(event["payload"]["messageId"])
        save_rows(event["id"], parse_stock(message))
    return "", 204

For heavy files, queue the read with Celery or RQ and return the 204 at once: Mailcycle expects a 2xx within 10 seconds. The full Python tour, with folders, waiting for mail and pytest helpers, is in Receive email in Python.

Re-parsing after a rule change

When a supplier renames a column, fix parse_stock and run it again over everything still at the address:

# reparse.py
import os

from parse_stock import mc, parse_stock
from store import replace_rows

address_id = os.environ["SUPPLIER_INVOICES_ADDRESS_ID"]

for message in mc.messages.iterate(address_id):
    replace_rows(message.id, parse_stock(message))
    print(message.received_at, message.subject)

Each address keeps its mail for the retention you set, up to 90 days, so a fix can reach back three months. Re-running costs nothing extra, because the parsing is your own code on your own machine.

Email to JSON for n8n, Zapier and Make

Not every team wants to run a server. The decrypt Worker is one file you deploy to your own free Cloudflare account. It receives the Mailcycle webhook, checks the signature, opens the message with that address’s exported key and posts plain JSON to your tool’s catch-hook URL (shortened here):

{
  "eventId": "evt_4k2m9x7q1b8c3v6n0z5a",
  "id": "msg_91be02c4a7d1",
  "inboxId": "ibx_k3v9x2mq7a",
  "receivedAt": "2026-11-29T09:14:03.000Z",
  "from": "orders@shop.example",
  "subject": "Order #1042 confirmed",
  "text": "Order #1042\n2 x Linen tea towel\n1 x Oak board\nTotal: £84.50",
  "attachments": []
}

In n8n, the Webhook trigger puts this under body, and a Code node holds the parsing rule:

// n8n Code node, "Run once for each item"
const text = $json.body.text;
const id = text.match(/Order\s*#\s*(\w+)/i)?.[1] ?? null;
const total = text.match(/Total[:\s]+[£$€]\s*([\d,]+\.\d{2})/i)?.[1] ?? null;
return { json: { orderId: id, total: total && Number(total.replace(/,/g, '')), from: $json.body.from } };

Point the next node at Google Sheets, Airtable, Postgres or your CRM. In Zapier, a Webhooks by Zapier catch hook receives the same JSON, and Formatter or Code by Zapier does the extraction. The step-by-step n8n setup, with screenshots, is in Run an n8n workflow on every new email, and Receive email in Node-RED covers the same route with an http in node.

An AI agent as the parser

Some mail has no fixed layout: quote requests written by hand, forwarded threads, scanned delivery notes. For those, an agent can read the email and return the fields. On Scale, mailcycle-mcp runs on the agent’s own machine and gives Claude Code, Claude Desktop, Cursor, Codex or any other MCP client tools to list addresses, read messages, wait for new mail and read attachments.

Pair it with npx -y mailcycle-mcp pair, then give the agent the job in plain words:

Read every new message at quotes@ from today. For each one, return JSON with
customer_name, company, product, quantity and requested_delivery_date.
Use null for anything the email doesn't say. Read the attachments if the
request is in a PDF.

Every agent starts in reply-only mode, so it reads and extracts without sending anything on its own. A common split is code for the high-volume senders with stable layouts, and the agent for the long tail. The email MCP server guide has the pairing steps, and AI agent email inbox shows an agent and a webhook on the same account.

Where Mailcycle wins on price and delivery

Cost per received email

Monthly prices from each pricing page, monthly billing. Parseur’s page showed its prices to us in pounds.

Plan Price a month Emails a month
Mailparser Starter $29.95 250 emails
Mailparser Business $99.95 2,000 emails
Mailparser Premium $299.95 10,000 emails
Parseur Micro £49 100 pages
Parseur Starter £129 1,000 pages
Parseur Pro £499 10,000 pages
Mailcycle Operator $15 250,000 received messages

Mailparser’s own figure for Starter is $0.1198 per credit. Operator works out at $0.00006 per received message, and an attached PDF doesn’t change the count. Operator also includes 250 addresses, API keys and 10 webhooks. Limits for every plan are on plans and limits and Mailcycle pricing.

Signed webhooks with a day and a half of retries

Every Mailcycle delivery is signed with HMAC-SHA256 over a timestamp and the exact body, so your receiver knows the event came from Mailcycle and was not replayed. A delivery that gets no 2xx is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 12 hours: eight attempts over about a day and a half, on every plan with webhooks. Each delivery stays in the log for 30 days, and one call redelivers it after a fix. The webhooks guide has the details.

SDKs in nine languages

The TypeScript and Python code above has a twin in Go, Rust, Java, .NET, PHP, Ruby and Swift, all under Apache-2.0, each with address creation, the signature check, message reads and attachments. A PHP back office and a Go worker can parse their own share of the same account’s mail. Install lines are on the SDK pages, and the developer overview lists the REST endpoints.

Mail encrypted on arrival

Mail is encrypted the moment it arrives, with keys from your account’s 12-word recovery phrase, and each address has its own key pair. The webhook body carries two ids, so a proxy, a request log or an error tracker in front of your receiver only ever sees ids. The SDK opens each message inside your process, and safeHtml has tracking pixels and remote content removed, ready to show in your own admin screens. The encryption page explains how the phrase becomes each address’s keys.

Moving from Mailparser or Parseur, step by step

  1. List each inbox or mailbox you use and the fields it extracts. Save five or six real emails from each as samples.
  2. Create one Mailcycle address per inbox with the provisioning script above, and note each address id.
  3. Write one parse function per inbox, with the samples as test fixtures, until every test passes.
  4. Create the message.received webhook in the app (API, then Webhooks) or with mc.webhooks.create, and store its secret.
  5. Deploy the receiver, or the decrypt Worker if the next step is n8n, Make or Zapier.
  6. Change the forwarding rules in Gmail, Outlook or the sending system to the new addresses, one source at a time.
  7. Compare a few days of records from both paths, then switch the old inbox off.

If your parsing feeds a product of your own, for example tickets from customer email, Add inbound email to your SaaS builds that whole feature on the same pattern.

Coming from another inbound service

If you are moving from an inbound provider rather than a parsing tool, these guides map that provider’s fields onto Mailcycle: the SendGrid Inbound Parse alternative, the Mailgun inbound Routes alternative, the Postmark inbound alternative, the Resend inbound alternative and the CloudMailin alternative.

Troubleshooting the parser

The parse function returns null for mail that looks right

The sender changed its layout, or the content is only in the HTML part. Log message.subject with each unparsed id, save the email as a fixture, and either update the pattern or read message.safeHtml with an HTML parser such as cheerio or BeautifulSoup.

Every delivery returns 401

Something parsed or re-encoded the body before the check, or the secret belongs to another webhook. Verify the raw body first, before any JSON middleware, and make sure the secret is the one shown when this webhook was created.

messages.get returns opened false

The client was built without the recovery phrase, or with another account’s phrase. Pass the phrase the addresses were created under to withApiKey or with_api_key.

Sources and dates

Each Mailparser and Parseur statement above was read on 29 November 2026 on these pages:

What Page
Mailparser plans, prices, emails and inboxes, $0.1198 per credit, Parsing Assistant fee https://mailparser.io/pricing/
Mailparser private inbox, parsing rules, webhook formats https://mailparser.io/integration/email-to-rest-api-webhook/
Mailparser drag-and-drop editor and Parsing Assistant service https://mailparser.io/parsing-assistant/
Mailparser template library https://mailparser.io/template-library/
Mailparser integrations https://mailparser.io/integrations/
Parseur plans, prices in pounds, pages and credits https://parseur.com/pricing
Parseur credits per email and attachment https://help.parseur.com/en/articles/4237000-credits-subscription-and-pricing-faq
Parseur mailbox with a random address, template then AI https://help.parseur.com/en/articles/3548460-setting-up-your-first-parseur-mailbox
Parseur webhook body and retries https://developer.parseur.com/webhooks.md

Mailcycle figures come from https://mailcycle.email/pricing and https://docs.mailcycle.email/concepts/plans-and-limits/. Mailparser and Parseur are trademarks of their owners. We are not affiliated with either.

FAQ

What is a good Mailparser or Parseur alternative for developers?

Mailcycle suits teams that would rather keep their parsing rules in code. Each incoming email reaches your webhook as a signed message.received event, your code reads the message by id as one JSON object with from, to, subject, text, html and the attachment list, and a parse function you write and test turns it into the record you need. SDKs exist in TypeScript, Python, Go, Rust, Java, .NET, PHP, Ruby and Swift.

How do I parse incoming email to JSON with Mailcycle?

Create an address with the API, add a webhook for message.received, and in the receiver call mc.messages.get with the messageId from the event. The SDK returns the message already opened, with every field named, so JSON.stringify in TypeScript or dataclasses.asdict in Python gives you the whole email as JSON. Your parse function then picks out the fields you care about.

Can I parse email attachments such as CSV files?

Yes. Each message lists its attachments with filename, mime type and size, and mc.messages.attachment returns the bytes of any one of them, already opened. From there Python's csv module, openpyxl, pdfplumber or any library you already use reads the file inside your own process.

How much does Mailcycle cost compared with Mailparser and Parseur?

Operator is $15 a month for 250 addresses and 250,000 received messages, with API keys and 10 webhooks. On their pricing pages, Mailparser Starter is $29.95 a month for 250 emails, and Parseur Micro is £49 a month for 100 pages. Mailcycle counts each message once, whatever it has attached.

Can I use Mailcycle with n8n, Zapier or Make instead of writing a server?

Yes. The decrypt Worker runs in your own free Cloudflare account, receives the webhook, opens the message and posts it as plain JSON to the catch-hook URL of n8n, Make, Zapier or Pipedream. A Code node or a Formatter step then pulls out the fields, and the rest of the workflow uses them.

Can an AI agent extract data from emails instead of fixed rules?

Yes, on Scale. mailcycle-mcp runs on the agent's own machine and gives Claude Code, Claude Desktop, Cursor, Codex or any other MCP client tools to list addresses, read messages, wait for new mail and read attachments, so the agent reads each email and returns the fields you asked for.

How are Mailcycle webhooks secured?

Every delivery carries a Mailcycle-Signature header, an HMAC-SHA256 of a timestamp and the raw body keyed with that webhook's secret. verifyWebhookSignature in TypeScript and verify_webhook_signature in Python check it in constant time and refuse anything older than five minutes. A webhook can also send an Authorization header of your own.

What happens if my parser has a bug and misses some emails?

Fix the parse function and run it again over the address. Messages stay listable at their address for its retention, from 1 to 90 days, so mc.messages.iterate walks every one of them and your fixed code re-parses them at no extra cost. Failed webhook deliveries can also be redelivered from the delivery log.

How is incoming mail protected?

Mail is encrypted the moment it arrives, with keys from your account's 12-word recovery phrase, and each address has its own key pair. Webhook bodies carry ids and no content, and the SDK opens each message inside your own process.

Receive email in code