Email Tool

Send emails from your AI agents for reports, analysis results, and scheduled notifications.

Email Tool

Send emails directly from your TeamDay agents. Perfect for receiving reports, analysis results, and notifications from scheduled tasks.

Security Model

Important: The email tool can only send emails to the authenticated user (you). This security restriction prevents agents from being used to send emails to arbitrary addresses.

  • Interactive sessions: Email goes to the user running the chat
  • Scheduled missions: Email goes to the mission owner
  • No way to specify a different recipient

This design ensures agents can’t be misused for spam or phishing.


How It Works

For Interactive Chats

When you’re chatting with an agent, simply ask it to email you:

“Analyze this data and send me a summary via email”

The agent uses the email-sender skill which calls our secure API endpoint. Your email address is automatically resolved from your authenticated session.

For Scheduled Missions

When a mission runs on schedule, it uses the mission owner’s userId to look up their email address. No active session required.


Usage Examples

Ask Agent to Send Email

User: Research the latest Claude updates and email me a summary

Agent: I'll research Claude updates and send you an email summary.
[Searches web, compiles findings]
[Sends email to your registered address]

Done! I've sent a summary of the latest Claude updates to your email.

Scheduled Report

Mission: Daily Analytics Report
Schedule: Every day at 9 AM
Goal: Fetch yesterday's analytics and email me a summary

[Agent runs automatically]
[Fetches data, generates report]
[Emails report to mission owner]

Email Format

Agents can send both plain text and HTML emails:

Plain Text

Simple, clean text for quick notifications:

Subject: Task Completed: Data Analysis

Your requested data analysis is complete.

Key findings:
- 25% increase in user signups
- Mobile traffic up 18%
- Bounce rate decreased by 5%

Full report attached to this conversation.

HTML (Rich Formatting)

For detailed reports with structure:

<h1>Weekly Analytics Report</h1>
<h2>Key Metrics</h2>
<table>
  <tr><td>Users</td><td>12,543</td><td>+15%</td></tr>
  <tr><td>Sessions</td><td>45,231</td><td>+22%</td></tr>
</table>
<h2>Recommendations</h2>
<ul>
  <li>Focus on mobile optimization</li>
  <li>Improve checkout flow</li>
</ul>

Technical Details

Email Configuration

SettingValue
SenderTeamDay Agent <[email protected]>
Domainmail.teamday.ai
ProviderMailgun (EU region)
GDPREU-based servers for compliance

Parameters

ParameterTypeRequiredDescription
subjectstringYesEmail subject line
textstringNo*Plain text email body
htmlstringNo*HTML email body for rich formatting

*At least one of text or html is required.

Response Format

{
  "success": true,
  "messageId": "<[email protected]>",
  "sentTo": "[email protected]",
  "note": "Email sent to your registered email address"
}

Best Practices

Do

  • Use clear, descriptive subject lines
  • Include both text and HTML for important reports
  • Structure long reports with headers and sections
  • Keep emails concise - link to full details in the app
  • Use for actionable notifications (reports ready, tasks complete)

Don’t

  • Expect to send to arbitrary email addresses (security restriction)
  • Send very large attachments (use links instead)
  • Send too frequently (respect inbox)
  • Include sensitive data without considering email security

Use Cases

Use CaseExample Prompt
Research Reports”Research X and email me a summary”
Data Analysis”Analyze this CSV and email me the insights”
Task Completion”When done, send me an email confirmation”
Scheduled ReportsMission: “Every Monday, email me a weekly summary”
Error Alerts”If something fails, email me immediately”

Troubleshooting

”Could not determine user email address”

Your account may not have a verified email. Check your profile settings.

”Email service not configured”

Contact support - the Mailgun integration may need configuration.

Email not received

  1. Check spam/junk folder
  2. Verify your email in account settings
  3. Check if the agent reported success in the chat

Future: Custom Email Tool

Coming soon: Configure your own Mailgun/email provider to send to any address. This will require:

  1. Activating the custom email tool in organization settings
  2. Providing your own API credentials
  3. Accepting responsibility for email usage

This feature will be available in the tool activation system.