What This Table Is

The sys_email table is the complete log of all email communication flowing through your ServiceNow instance. Every inbound email (from users creating incidents, replies to notifications) and outbound email (notifications, alerts, manual sends) creates a record here. This is the central audit trail for all email activity, storing the full message content, headers, attachments, and processing status.

Owned by the Platform module, this table supports the entire email processing pipeline. Inbound emails flow through the email processing engine that creates or updates records based on email content. Outbound emails generate from notification engines, scheduled jobs, and direct user actions. The table integrates tightly with the notification system (sysevent_email_action) and email accounts configuration (sys_email_account).

This table does not extend any parent table — it's a standalone platform table. No tables extend sys_email either. However, it connects to virtually every other table through the target_table and target fields when emails relate to specific records.

In large enterprise environments, this table commonly contains millions of records. A typical production instance with 50,000 users might accumulate 100,000+ email records monthly. The table includes both successful deliveries and failures, making it enormous over time. Most queries should include date ranges and direction filters to maintain performance. Email content and attachments contribute significantly to database size.

When You'll Script Against This Table

Developers typically query sys_email in Business Rules (especially on task tables to check for recent email activity), scheduled jobs that clean up old emails, and Script Includes that build email audit reports. Integration scripts often query this table to verify email delivery status or extract email content for external systems. Background scripts frequently target this table for data cleanup and archival processes.

Most users can read their own email records, but the admin role is typically required for broad access. The email_admin role provides specific email management capabilities. Scripts running in global scope can access all records, while scoped applications may have limited visibility based on ACL configurations.

Common scripting patterns:

  • Check if specific notifications were sent to prevent duplicate emails
  • Extract failed email deliveries for retry processing or user notification
  • Build email audit reports showing communication history for specific records
  • Archive or delete old email records to manage database size
  • Parse inbound email content to extract data for custom processing workflows
  • Monitor email volume and delivery success rates for system health dashboards
  • Track email response times and user engagement patterns for process optimization

Table Gotchas

⚠️

Never query sys_email without date range and type filters. The table is massive and unfiltered queries will timeout or severely impact performance.

  • The target field stores the sys_id but behaves like a string, not a true reference field — you can't dot-walk through it
  • Email content in body_text is limited to 8000 characters — longer content gets truncated without warning
⚠️

The state field uses different values than typical ServiceNow states: 'sent', 'ready', 'failed', 'ignored' — not numbers.

  • Attachments are stored in separate sys_attachment records — the email record won't show attachment content directly
  • Inbound emails may create multiple records if they're processed by multiple email accounts or forwarding rules
⚠️

The type field ('send' vs 'receive') is not indexed by default — add an index if you frequently filter by direction on large datasets.

Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

The sysevent_email_action table connects directly to sys_email through the email processing pipeline — each notification event that triggers an email creates records in both tables. The sys_email_account table defines the SMTP and IMAP configurations used for sending and receiving emails logged in sys_email.

The sys_user table links through both sender and recipient email addresses for user identification. When emails relate to specific records, the target_table field commonly points to incident, sc_request, or other task-based tables. The sys_attachment table stores file attachments sent with emails, referenced by the email's sys_id.

Developers frequently join sys_email with sys_journal_field to build complete communication histories showing both system updates and email exchanges. The notification table provides the templates and rules that generate outbound emails, making it essential for troubleshooting email delivery issues.