Inbound email for AI agents

Turn inbound emails
into agent-ready JSON

Connect ANY mailbox. Receive emails as structured JSON, optimized for LLM context windows. No parsing headaches.

Trusted by AI teams at leading companies

From messy email to compact agent context

Show your agent only the parts it needs: the latest reply, key fields, tables, links, and attachment metadata — mapped into JSON before it reaches the LLM.

Customer reply agent

Send your agent the latest reply, not the whole thread

Customer replies often include quoted history, signatures, and formatting noise. MailWebhook extracts the new reply and maps it into compact JSON before your support agent sees it.

Incoming email
From: sarah@example.com
Subject: Re: Order #8421
Can you change delivery to Friday?

—
Sarah

On Tue, Support wrote:
> Your order has shipped...
> Tracking details...
Reply textSignatureQuoted thread
MailWebhook extracts
Extract:
reply_segments.text.reply_contentreply_segments.text.has_quoted_content
Map to:
fromsubjectreply_texthas_quoted_content
Agent-ready JSON
{
  "type": "customer_reply",
  "from": "sarah@example.com",
  "subject": "Re: Order #8421",
  "reply_text": "Can you change delivery to Friday?",
  "has_quoted_content": true
}

Your agent can now classify the reply, look up the order, draft a response, or escalate to a human.

Reply segmentationThread cleanupCustom JSONCompact LLM context
Finance intake agent

Turn invoice emails into structured fields before the LLM sees them

MailWebhook extracts explicit invoice fields, table rows, links, and attachment metadata so your finance agent receives a compact intake event instead of a full email body.

Incoming email
From: billing@vendor.com
Subject: Invoice INV-1048
Invoice Number: INV-1048
Vendor: Acme Supplies
Amount: $1,240.00
Due Date: 2026-05-31

| Item         | Qty | Total     |
| May services | 1   | $1,240.00 |

Attachment: invoice.pdf
Key-value linesMarkdown tablePDF attachment
MailWebhook extracts
Extract:
key_value_pairs.valuestables[0].rowsmessage.attachments
Map to:
invoice_numbervendoramountdue_dateline_itemspdf_attachments
Agent-ready JSON
{
  "type": "invoice_email",
  "invoice_number": "INV-1048",
  "vendor": "Acme Supplies",
  "amount": "$1,240.00",
  "due_date": "2026-05-31",
  "line_items": [{
    "item": "may_services",
    "qty": "1",
    "total": "$1,240.00"
  }],
  "pdf_attachments": [{
    "filename": "invoice.pdf",
    "content_type": "application/pdf",
    "sha256": "..."
  }]
}

Your agent can match the vendor, check policy, create an approval task, or ask for missing fields.

Key-value extractionTable extractionAttachment metadataCustom JSON
Incident triage agent

Convert alert emails into clean incident events

MailWebhook extracts alert fields and links into a compact JSON event, so your incident agent does not need the full notification email in its prompt.

Incoming email
From: alerts@example-monitor.com
Subject: Critical: checkout-api latency above threshold
Severity: Critical
Service: checkout-api
Environment: production
Metric: p95 latency > 2s
Window: 10 minutes

View alert: https://monitor.example.com/alerts/abc123
SeverityServiceMetricAlert link
MailWebhook extracts
Extract:
key_value_pairs.valuesextract.urlsregex.match on subject
Map to:
severityserviceenvironmentmetriclinkspriority
Agent-ready JSON
{
  "type": "incident_alert",
  "subject": "Critical: checkout-api latency...",
  "severity": "Critical",
  "service": "checkout-api",
  "environment": "production",
  "metric": "p95 latency > 2s",
  "window": "10 minutes",
  "priority": "high",
  "links": [
    "https://monitor.example.com/alerts/abc123"
  ]
}

Your agent can classify the incident, check recent deploys, update an issue, or notify the right team.

Key-value extractionURL extractionRegex classificationJSON webhook

CAPABILITIES

Structured data, ready for reasoning

Every extractor is designed to produce clean, predictable output that LLMs can immediately understand and act upon.

Pre-LLM Filtering

Route rules filter irrelevant emails before they reach your agent. Reduce token spend by rejecting noise at the edge.

rules: [{ match: "from:orders@*", forward: true }]

Reply Isolation

Extract only the new reply content, removing quoted threads and signatures. Perfect for conversation context.

reply_only: "The shipment arrives tomorrow at 2pm."

Table Extraction

Parse HTML tables into structured arrays. Ideal for processing reports, invoices, and data exports.

tables: [{ headers: ["Item", "Qty"], rows: [...] }]

URL Detection

Extract all URLs with context labels. Enable your agent to follow links or process attachments.

urls: [{ url: "https://...", label: "Download Report" }]

Key-Value Extraction

Parse structured fields like 'Order ID: 12345' into usable data. No regex required.

key_values: { order_id: "12345", status: "shipped" }

Deterministic DSL

Define extraction rules once, get consistent output forever. No AI variability, no training data.

extractors: ["reply_only", "key_values", "tables"]

HMAC Verification

Cryptographic signatures on every webhook. Verify authenticity before your agent processes.

x-mailwebhook-signature: sha256=a1b2c3...

Idempotency Keys

Deduplicate agent actions on retries. Every webhook includes a unique key to prevent duplicate processing.

x-idempotency-key: msg_abc123_route_456

Automatic Retries

Failed deliveries retry with exponential back-off. Your agent gets multiple chances without manual intervention.

retry: { attempts: 5, backoff: "1s, 5s, 30s, 2m, 10m" }

INTEGRATIONS

Connect any email source

OAuth for Gmail and Outlook. IMAP for everything else. Or use our hosted inboxes for instant setup.

Gmail

OAuth 2.0 integration. Monitor any inbox or shared mailbox.

  • OAuth flow
  • Push notifications
  • Labels support

Microsoft 365

Enterprise-ready Outlook integration with Azure AD SSO.

  • Azure AD SSO
  • Shared mailboxes
  • Delegated access

IMAP

Connect any IMAP-compatible mailbox. Self-hosted or cloud.

  • Any provider
  • Custom servers
  • Full control

Hosted Inbox

Get a dedicated email address instantly.

  • Instant setup
  • No DNS config
  • Unlimited aliases

USE CASES

What AI teams are building

Each use case highlights a distinct MailWebhook capability that makes agentic email workflows possible.

Thread-Aware Support Agents

Reply segmentation strips quoted text, signatures, and forwards - your agent only sees the new message, not the entire thread history.

20KB thread → 200 bytes of actual reply → 99% token savings
call.extract.reply_segments

Invoice & Order Extraction

HTML tables from order confirmations, invoices, and reports convert to structured JSON arrays your agent can process directly.

Invoice table → [{item, qty, price}] → auto-reconcile
call.extract.tables

Attachment Pipeline Agents

Get attachment metadata, content types, and secure URLs. Route PDFs, images, and documents to specialized processing agents.

Contract.pdf attached → signed URL → parse with vision model
attachments[].url

Pre-LLM Email Filtering

Route rules filter out newsletters, spam, and irrelevant emails before they hit your agent. Only pay for tokens that matter.

1000 emails/day → 50 relevant → 95% cost reduction
rules: [{ match, forward }]

Multi-Agent Routing

Route different email patterns to different agent endpoints. Support tickets to one agent, invoices to another, alerts to a third.

from:*@vendor.com → finance-agent, subject:urgent → escalation-agent
routes[].endpoint

Reliable Agent Delivery

Automatic retries with exponential back-off plus idempotency keys. Your agent processes each email exactly once, even during outages.

Agent down → retry 5x with backoff → dedupe on resume
x-idempotency-key

PRICING

Simple, usage-based pricing

Start free. Scale as your agents process more emails.

Free

$0/month

Perfect for small projects

  • 300 emails/month
  • 1 connected mailbox
  • 3 routes per project
  • 15 min polling interval
  • 100 MB attachment storage
  • 3 days log retention
  • Community support
Most Popular

Starter

$29/month

For growing teams and projects

  • 5,000 emails/month
  • 5 connected mailboxes
  • 2 hosted mailboxes
  • 10 routes per project
  • 5 min polling interval
  • 5 GB attachment storage
  • 7 days log retention
  • Email support

Pro

$99/month

For production workloads

  • 50,000 emails/month
  • 20 connected mailboxes
  • 10 hosted mailboxes
  • 50 routes per project
  • 1 min polling interval
  • 50 GB attachment storage
  • 30 days log retention
  • Live support

Frequently Asked Questions

Start in 5 minutes

Ready to give your AI agent an inbox?

Join AI teams building the next generation of email-powered agents. Start with 300 free emails per month.