Email Source

Email Source

Receive inbound emails in Outrun and store them as activities. The email source supports two setup methods: organization-wide MX record routing and per-user Gmail forwarding.

Inbound Only

This is a receive-only source. Emails are stored as activities for tracking and analysis. Sending or replying to emails is not supported.

Supported Objects

Email maps to a single standardized object type:

Activities (from Emails)

  • Source Object: emails
  • Primary ID: Message ID
  • Key Fields: Subject, sender, recipients, body, attachments metadata

Messages

  • Emails also map to the Messages object type, making email content available alongside chat and other messaging channels in a unified view.

Before You Start

Before setting up full forwarding, send yourself a quick test to catch any issues early:

  1. Send a test email first. Before creating any forwarding rules, manually send (or forward) one email to your Outrun inbound address ({sourceId}@inbound.getoutrun.com). If it arrives in Outrun, you're good to go -- skip ahead to Setup Methods.
  2. If the test email bounces, your email provider likely blocks external forwarding. The bounce message will usually tell you exactly what's wrong (e.g. "Your organization does not allow external forwarding"). See Forwarding Restrictions below for how to resolve it.
  3. If the test email disappears (no bounce, nothing in Outrun), check your spam/junk folder for a blocked delivery notice. Some providers silently drop forwarded emails.
  4. If the test works, set up your forwarding rule and send one more test through the rule to confirm the full pipeline works end-to-end.
  5. Setting up multiple people in the same organization? Run the test from one account first. If it works, it'll work for everyone. If it needs a fix, the fix applies to all users -- so you only need to resolve it once.

Setup Methods

Method 1: MX Record (Organization-wide)

Route all inbound email for a domain through Outrun by pointing your DNS MX records at your source-specific subdomain.

Best for: Capturing all inbound email across your entire organization.

Setup:

  1. Create an Email source in Outrun
  2. Add an MX record in your domain's DNS:
    • Type: MX
    • Priority: 10
    • Target: {sourceId}.customer.getoutrun.com

Method 2: Gmail Forwarding (Single User)

Forward emails from an individual Gmail account to Outrun.

Best for: Tracking a specific mailbox without changing DNS.

Setup:

  1. Create an Email source in Outrun
  2. In Gmail, go to Settings > Forwarding and POP/IMAP
  3. Click Add a forwarding address
  4. Enter: {sourceId}@customer.getoutrun.com
  5. Confirm the forwarding via the verification email
  6. Select Forward a copy of incoming mail to and choose the address

Method 3: Outlook / Microsoft 365 Forwarding (Single User)

Forward emails from an Outlook or Microsoft 365 mailbox to Outrun.

Best for: Tracking a specific mailbox in an enterprise environment.

Setup:

  1. Create an Email source in Outrun
  2. In Outlook on the web, go to Settings > Mail > Forwarding
  3. Enable "Forward my email to"
  4. Enter: {sourceId}@inbound.getoutrun.com
  5. Optionally check "Keep a copy of forwarded messages"

Alternatively, create an Inbox Rule in Outlook:

  1. Go to Settings > Mail > Rules
  2. Add a new rule (e.g., "Forward to Outrun")
  3. Set the condition (e.g., all messages, or a specific sender/subject)
  4. Set the action to "Forward to" > {sourceId}@inbound.getoutrun.com

Important: If forwarding fails silently or you receive bounce-backs, your organization likely has external forwarding restrictions enabled. See Forwarding Restrictions below.

Field Mappings

Activities (Emails)

Outrun Field Email Field Type Description
type (literal message) String Activity type, always "message"
content StrippedTextReply String Reply-only text content
metadata.subject Subject String Email subject line
metadata.from From String Sender email address
metadata.fromName FromName String Sender display name
metadata.to To String Recipient address
metadata.cc Cc String CC recipients
metadata.htmlBody HtmlBody String Full HTML body
metadata.textBody TextBody String Full plain text body
metadata.replyTo ReplyTo String Reply-to address
metadata.date Date String Email timestamp
metadata.messageId MessageID String Unique message identifier
metadata.attachments Attachments Array Attachment metadata (name, type, size)

Attachment Handling

Attachment file content (base64 data) is not stored. Only metadata is retained:

Field Description
Name Attachment filename
ContentType MIME type (e.g., application/pdf)
ContentLength File size in bytes

Sync Behavior

Real-time Processing

  • Delivery: Emails arrive via webhook in real time (no polling)
  • Processing: Each email is immediately written to the stream_data table
  • Consolidation: The listener service picks up new records and consolidates them into activities

Data Pipeline

  1. Resend receives the inbound email
  2. Resend POSTs the webhook event to /api/v1/webhook/email
  3. The stream service extracts the source ID from the recipient address
  4. Raw email data (minus attachment content) is stored in the stream_data table
  5. The listener triggers consolidateRecord which normalizes the data
  6. The consolidateActivities job creates the activity record

Deduplication

Emails are deduplicated using the MessageID field as the external ID. If the same email is delivered twice (e.g., via both MX and forwarding), only one activity is created.

System Nuances

Email-Specific Considerations

  1. Source ID in Address: Each email source gets a unique address using the source's ID
  2. Multiple Sources: A workspace can have multiple email sources, each with its own address
  3. No Authentication Required: Email sources don't use OAuth tokens -- they receive data via webhooks
  4. Attachment Limits: Attachment content is stripped to avoid storage bloat; only metadata is kept
  5. HTML Sanitization: HTML body content is stored as-is; sanitize before rendering in UI

Address Formats

Method Address Format
MX Record *@{sourceId}.customer.getoutrun.com
Gmail Forwarding {sourceId}@customer.getoutrun.com
Outlook / M365 Forwarding {sourceId}@inbound.getoutrun.com

Forwarding Restrictions

If your test email bounced, your email provider is blocking external forwarding. This is common in managed work environments -- it's a security policy, not a bug.

What to do

  1. Check the bounce message. It usually tells you exactly what's blocked. The most common error is 550 5.7.520 ("Your organization does not allow external forwarding").
  2. Try a different method. If your mailbox forwarding is blocked, you may still be able to forward using an Inbox Rule instead (see Method 3 above). Some providers treat these differently.
  3. If neither works, involve your IT team. Ask them to allow forwarding to inbound.getoutrun.com. This is a single domain whitelist that keeps all other forwarding restrictions intact. Share the provider-specific steps below to make it easy for them.

For IT Admins

Microsoft 365 - Create a transport rule in the Exchange Admin Centre (Mail flow > Rules) that allows forwarding when the recipient domain is inbound.getoutrun.com, or add it as an allowed Remote Domain with automatic forwarding enabled.

Google Workspace - In the Admin Console under Apps > Google Workspace > Gmail > Compliance, add inbound.getoutrun.com to the allowed forwarding destinations.

Other managed providers - Whitelist inbound.getoutrun.com as a permitted external forwarding destination.

Personal email (iCloud, Outlook.com, Gmail, Yahoo) - Forwarding typically works without restriction. No admin action needed.

Best Practices

Setup Recommendations

  1. Test before you commit: Send a manual test email to your Outrun inbound address before setting up forwarding rules. This catches provider restrictions immediately.
  2. Choose the right method: Use MX records for organization-wide capture, Gmail or Outlook forwarding for individual mailboxes.
  3. DNS propagation: MX record changes can take up to 48 hours to propagate.
  4. Gmail verification: Gmail requires you to confirm the forwarding address via a verification email -- check your spam folder if it doesn't arrive.
  5. Multiple users, same org: Test from one account first. If it works, it works for everyone. If it needs a fix, the fix applies org-wide.

Monitoring

  1. Stream history: Check the stream_history table for delivery records
  2. Webhook logs: Monitor the stream service logs for any delivery errors
  3. Activity count: Verify activities are being created in the workspace

Troubleshooting

Common Issues

Emails bouncing back

  • If the error mentions 550 5.7.520 or "external forwarding", your provider blocks forwarding. See Forwarding Restrictions for how to resolve it step by step.
  • If the error references an unknown recipient, double-check the source ID in the forwarding address.

Emails not arriving (no bounce)

  • Check that the forwarding rule is active in your email settings
  • Check your spam/junk folder for a silently blocked delivery notice
  • For MX setups, verify DNS records are correctly configured and propagated
  • Confirm the stream route exists in the stream_routes table

IT team asking about the forwarding rule

  • This is normal -- enterprise email systems flag new external forwarding rules. Let them know it's expected and share the domain (inbound.getoutrun.com) so they can whitelist it.

Source not found errors

  • Verify the source ID in the recipient address matches an active source
  • Check that the streamRoutes document has the correct sourceId and workspaceId

Missing email content

  • Text body may be empty for new (non-reply) emails -- check TextBody or HtmlBody in metadata
  • Attachment content is intentionally stripped; only metadata is stored

Support Resources


Ready to set up email tracking? Navigate to Sources > Add Source > Email in your workspace to get started.