Skip to main content

Overview

The Email connector lets you ingest documents by forwarding emails to a dedicated address. Each email becomes a bucket object with the body as a text blob, each attachment as a typed blob, and the original .eml preserved for chain of custody. This is built for compliance-oriented workflows — legal document intake, healthcare record forwarding, secure support inboxes — where email is the transport and the documents (attachments) are the payload.

Prerequisites

  • A Mixpeek account with an active namespace
  • A bucket and sync configured for the email connection
  • Cloudflare account with mixpeek.com (or your custom domain) in Cloudflare DNS — Email Routing is free on all plans

How It Works

  1. Create an email connection — Mixpeek assigns a unique inbound address (e.g., conn_abc123@inbound.mixpeek.com)
  2. Cloudflare receives the email — MX records point to Cloudflare Email Routing, which routes to a Worker
  3. Worker POSTs raw .eml — The Cloudflare Email Worker reads the raw RFC 2822 bytes and POSTs them to the Mixpeek webhook
  4. Mixpeek parses and stores — MIME parsing extracts headers → metadata, body → text blob, attachments → S3-backed blobs, raw .eml → S3

Configuration

Connection-level fields

Auto-provisioned fields (read-only)

Setup

1

Create an email connection

2

Create a bucket sync

Link the email connection to a bucket so incoming emails become objects:
3

Deploy the Cloudflare Email Worker

The Email Worker receives emails at *@inbound.mixpeek.com and POSTs the raw .eml bytes to the Mixpeek webhook. The worker source is in server/infra/cloudflare/email-worker/.
Optionally set a global signing key:
4

Enable Cloudflare Email Routing

In the Cloudflare Dashboard:
  1. Go to your domain (mixpeek.com) → Email Routing
  2. Enable Email Routing — Cloudflare auto-adds MX records for inbound.mixpeek.com
  3. Go to Routing rulesCatch-all address
  4. Set action to Send to a Worker → select mixpeek-email-ingest
Cloudflare Email Routing is free on all plans. MX records are managed automatically — no manual DNS configuration needed.
5

Send a test email

Send an email with an attachment to the inbound address and verify the object appears in your bucket.

Object Structure

Each email becomes one bucket object with multiple blobs:

Email metadata fields

These are set as root-level fields on the object and can be mapped to your bucket schema:

Schema Mapping

Map email fields to your collection schema to make them searchable:
Use attribute_filter in your retriever to query by sender, date, or subject:

Security

Email headers and bodies may contain PII (names, email addresses, phone numbers). Consider enabling PII redaction in your collection pipeline or restricting access to the namespace containing email data.

Compliance Notes

Mixpeek does not currently hold a HIPAA BAA. If you need a BAA for PHI handling, contact us at sales@mixpeek.com to discuss your requirements.

Troubleshooting