Email Source

Email Source

Receive inbound emails in Outrun and store them as activities. Connect via IMAP for the fastest setup with no forwarding rule required, or forward from Gmail or Outlook -- both can run at the same time.

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: IMAP Polling (No Forwarding Needed)

Connect Outrun directly to your mailbox over IMAP. Outrun polls your Inbox and Sent folders on your behalf -- no forwarding rule to set up, and you also get visibility into what you've sent, not just what you've received.

Best for: Getting started fast, or when your provider blocks forwarding rules. Works alongside forwarding -- both can be on at the same time.

Setup:

  1. Create an Email source in Outrun (or open an existing one)
  2. Go to the IMAP tab
  3. Enter your mailbox's IMAP host, port, username, and an app-specific password (not your regular login password)
  4. Click Test Connection, then Save

iCloud Mail users: Apple requires a different username for IMAP than the address people actually email you at. If your mailbox is [email protected] via an iCloud+ custom domain, the IMAP username is the part before @ in your primary @icloud.com address (e.g. janedoe, not [email protected] and not [email protected]). Find your primary @icloud.com address at appleid.apple.com under Sign-In and Security. Generate an app-specific password there too -- your regular Apple ID password will not work.

Microsoft 365 users: Instead of an app-specific password, click Connect Microsoft Account to sign in with OAuth -- no password ever touches Outrun. See Microsoft 365 Admin Consent below if your sign-in is blocked with an admin-approval message.

Microsoft 365 Admin Consent

Microsoft's own recommended default security settings block individual users from granting IMAP and SMTP mail permissions to third-party apps themselves -- this is standard behavior for most Microsoft 365 organizations, not something unique to strict IT policies. If your sign-in fails with a message mentioning admin approval, this is why.

What to do: When this happens, Outrun shows a one-time approval link right in the connection screen, with a Copy button. Send that link to your IT administrator.

For IT Admins: Opening the link takes you to a standard Microsoft consent screen. Approve it while signed in with a Global Administrator, Application Administrator, or Cloud Application Administrator role. This is a one-time action for your whole organization -- once approved, every employee can connect their own mailbox with a normal one-click sign-in, with no further admin steps needed per person. The approval only covers the specific mail permissions Outrun's email source needs (reading and sending via IMAP/SMTP) -- it does not grant access to anything else in your Microsoft 365 tenant.

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 (Forwarding)

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

Polling (IMAP)

  • Delivery: IMAP-connected mailboxes are checked on a short interval (every few minutes), not in real time
  • Coverage: Both Inbox and Sent are polled, so replies you send show up alongside what you receive
  • Consolidation: Same pipeline as forwarding once a message is fetched -- no difference downstream

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
IMAP Polling N/A -- connects directly to your mailbox, no forwarding address needed
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 IMAP for the fastest setup or when forwarding is blocked, Gmail or Outlook forwarding if you'd rather not share a mailbox password (even an app-specific one).
  3. Gmail verification: Gmail requires you to confirm the forwarding address via a verification email -- check your spam folder if it doesn't arrive.
  4. 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.