Skip to main content

Email Integration

Send emails to store memories, search, and ask questions. Receive transactional notifications for billing and authentication.

Overview

Trix provides a comprehensive email system with two main components:

  • Inbound Email - Send emails to your personal Trix address to store memories, search, and ask questions
  • Outbound Email - Transactional notifications for authentication, billing, and credit alerts

Quick Start

Get Your Email Address

Terminal
# Via CLI
trix email
# Returns: [email protected]

# Via API
curl -X GET https://api.trixdb.com/v1/email/address \
  -H "Authorization: Bearer YOUR_API_KEY"

Store a Memory via Email

Email
To: [email protected]
Subject: STORE: Meeting notes from Q1 planning @work #meeting p1

Discussed roadmap priorities and budget allocations...

Search via Email

Email
To: [email protected]
Subject: SEARCH: Q1 planning budget

You can also use natural language in your emails. Trix will use AI to understand your intent if no explicit command is detected.

Inbound Email Features

  • Multiple parsing strategies - Structured commands, subject line patterns, or AI-powered natural language
  • Metadata extraction - Automatic extraction of @spaces, #tags, and p1/p2/p3 priorities
  • Sender rules - Whitelist/blacklist controls for who can send to your address
  • Address rotation - Security feature to rotate your email address with optional grace period
  • Email digests - Scheduled summaries of your memories (daily, weekly, custom)
  • Reactions (IFTTT-style) - Automated triggers based on memory creation or matches
  • Attachment handling - Process and store email attachments

Outbound Email Features

  • Template-based - All emails use professionally designed templates
  • Async delivery - Queued for reliable delivery
  • Cooldown periods - Smart rate limiting to prevent notification spam
  • Contact sync - Automatic marketing list synchronization
  • Comprehensive tracking - Full notification history with status tracking

Email Types

CategoryEmail Types
AuthenticationWelcome, Password Reset, Email Verification, Password Changed
BillingPayment Success/Failed, Subscription Events, Credits Purchased
AlertsCredit Low, Credit Depleted, Overage Alert

Email Commands

CommandSubject FormatDescription
storeSTORE: contentSave information as a memory
searchSEARCH: queryFind existing memories
askASK: questionGet AI-powered answers from memories
list/list in bodyBrowse memories with filters
helpHELPGet usage instructions

Metadata Modifiers

Add metadata to your emails using these modifiers:

ModifierDescriptionExample
@spaceTarget space@work, @personal
#tagAdd tags (multiple allowed)#meeting #important
p1/p2/p3Priority (1=high, 3=low)p1
Example
Subject: STORE: Meeting notes @work #meeting #q1 p1

This will store with:
- Space: work
- Tags: meeting, q1
- Priority: 1 (high)

Security

The email system implements multiple security measures:

  • Webhook signature verification - HMAC-SHA256 with constant-time comparison
  • Timestamp validation - 5-minute freshness window for webhooks
  • Replay attack prevention - Token-based deduplication cache
  • Rate limiting - 10 emails/minute, 100 emails/hour per account
  • Injection prevention - Parameterized queries throughout
  • Command injection prevention - Quoted content removal before parsing

Treat your Trix email address as semi-private. Use sender rules to restrict access and rotate your address periodically for security.

Documentation