Email Tool Setup Guide
Enable your TriLuna agent to search, read, and draft emails during conversations using your IMAP email account.
Overview
The email tool allows your agent to:
- Search emails across your inbox, sent items, and archives
- Read email content to answer questions about specific messages
- Create email drafts that you can review and send
- Create reply drafts to existing emails with proper threading
Step 1: Configure Your Email Credentials
What You’ll Need
To connect your email account, you’ll need the following information from your email provider:
- Email Address: Your full email address (e.g., you@yourdomain.com)
- Email Password: Your email account password or app-specific password
- IMAP Server: The IMAP server address (e.g., mail.yourdomain.com, imap.gmail.com)
- IMAP Port: Usually 993 (secure) or 143 (standard)
- SMTP Server: The SMTP server address for sending (e.g., mail.yourdomain.com, smtp.gmail.com)
- SMTP Port: Usually 587 (TLS) or 465 (SSL)
Common Email Provider Settings
Gmail
- IMAP Server: imap.gmail.com
- IMAP Port: 993 (SSL)
- SMTP Server: smtp.gmail.com
- SMTP Port: 587 (TLS)
- Note: You must create an App Password instead of using your regular Gmail password
Microsoft 365 / Outlook.com
- IMAP Server: outlook.office365.com
- IMAP Port: 993 (SSL)
- SMTP Server: smtp.office365.com
- SMTP Port: 587 (TLS)
Custom Domain / cPanel Hosting
- IMAP Server: Usually mail.yourdomain.com
- IMAP Port: 993 (SSL recommended)
- SMTP Server: Usually mail.yourdomain.com
- SMTP Port: 587 (TLS recommended)
- Note: Check your hosting provider’s documentation for exact settings
Access the Email Configuration UI
- Log in to your TriLuna dashboard at https://triluna.app
- Navigate to My Agents
- Select the agent you want to configure
- Scroll down to the Webhook Integrations section
- Find Email Integration and toggle it ON
- Click the Configure button
Fill in Your Email Details
In the Email Integration configuration panel:
- Enter your Email Address
- Enter your Email Password (or app-specific password for Gmail/Outlook)
- Enter your IMAP Server and IMAP Port (default: 993)
- Enter your SMTP Server and SMTP Port (default: 587)
- Expand “Common Email Provider Settings” for quick reference if needed
- Click Save & Test Connection
The system will automatically test your IMAP connection and save your credentials if the test succeeds. You’ll see a green success message if everything is configured correctly.
Step 2: Test Your Email Connection
Once your credentials are configured, test the connection by asking your agent:
“Can you check my recent emails?” “Search my emails for messages from John” “Do I have any unread emails?”
Your agent should respond with email information if the connection is working properly.
Using the Email Tool
Searching for Emails
Ask your agent to search for specific emails:
“Search my emails for invoice” “Find emails from sarah@example.com” “Show me emails about the meeting” “What emails did I get today?”
Your agent will return a list of matching emails with:
- Subject line
- Sender
- Date received
- Brief preview/snippet
Reading Full Email Content
After searching, ask your agent to read specific emails:
“Read the first email” “What does the email from John say?” “Can you read that email to me?”
Your agent will read the full email content aloud or display it in text format.
Creating Email Drafts
Your agent can create draft emails that are saved to your Drafts folder:
“Draft an email to john@example.com saying thanks for the meeting” “Create a draft to sarah@example.com with subject ‘Project Update’” “Write a draft email declining the invitation politely”
Creating Reply Drafts
Reply to emails your agent has found:
“Reply to that email saying I’ll be there at 3pm” “Draft a reply to John’s message thanking him” “Create a reply draft saying I need more time”
Reply drafts maintain the email thread and include proper headers so the conversation stays organized.
Example Conversation Flow
You: “Check my emails for anything from my boss today”
Agent: “I found 2 emails from boss@company.com today. The first one is about ‘Q4 Budget Review’ sent at 9:15 AM, and the second is ‘Team Meeting Moved’ from 2:30 PM.”
You: “What does the budget email say?”
Agent: “The email says: ‘Hi team, please review the attached Q4 budget proposal before Friday’s meeting. Let me know if you have questions. Thanks, Sarah.’”
You: “Draft a reply saying I reviewed it and it looks good”
Agent: “I’ve created a reply draft saying ‘Hi Sarah, I reviewed the Q4 budget proposal and everything looks good. See you at Friday’s meeting.’ The draft is saved in your Drafts folder for you to review and send.”
What the Email Tool Can and Cannot Do
What It Can Do:
- Search your inbox, sent items, and archives
- Read email content including sender, subject, date, and body
- Create new email drafts
- Create reply drafts with proper threading
- Work with most IMAP-compatible email providers
- Handle multiple emails in one conversation
What It Cannot Do:
- Send emails directly (drafts must be sent by you)
- Delete or move emails
- Manage folders or labels
- Access attachments (coming soon)
- Mark emails as read/unread
- Access emails from accounts not configured
Troubleshooting
Agent says “Email account not configured”
Solution: Your email credentials haven’t been set up yet. Contact support@triluna.app to configure your email account.
Agent says “Email integration is only available for Enterprise users”
Solution: Upgrade to an Enterprise plan to use email features. Visit your dashboard’s Billing section or contact sales.
Connection or authentication errors
Solution: This usually means:
- Incorrect email password or server settings
- Need to enable IMAP access in your email provider settings
- Need to create an app-specific password (Gmail, Outlook)
- Firewall blocking IMAP/SMTP ports
Contact support with the specific error message for help.
Agent can’t find recent emails
Solution: The email tool searches your INBOX folder by default. If emails are in other folders, try being more specific: “Search my emails from last week about the project”
Drafts not appearing in my email client
Solution: Check your Drafts folder. Some email clients may need to be refreshed or synced to show new drafts created via IMAP.
Privacy & Security
How Your Email Data Is Handled
- Credentials: Encrypted and stored securely in our database
- Email Content: Fetched in real-time during conversations, not stored permanently
- Search Cache: Temporary search results cached for 24 hours to improve performance
- Audit Logs: All email tool usage is logged for security and debugging
Revoking Access
To revoke your agent’s email access:
- Contact support@triluna.app and request email credential removal
- Change your email password (will immediately break the connection)
- Revoke the app-specific password if using Gmail or similar provider
Best Practices
- Use App-Specific Passwords: For Gmail and Outlook, create dedicated app passwords rather than using your main password
- Be Specific: Use clear search terms to help your agent find the right emails quickly
- Review Drafts: Always review and edit drafts before sending to ensure accuracy
- Limit Sensitive Info: Don’t ask your agent to include passwords, SSNs, or payment details in drafts
- Test First: Try simple searches before relying on the tool for important tasks
Future Enhancements
We’re actively working on:
- Gmail OAuth integration (no password needed)
- Microsoft 365 OAuth integration
- Attachment support (reading and creating)
- Folder management
- Calendar integration with email invites
- UI-based credential management in your dashboard
Contact support@triluna.app with your email provider details to enable email integration for your agent!
Need More Help?
If you need assistance with email integration:
- Email our support team
- Use the chat widget on your dashboard
- Browse our other help articles