Email to Slack: Automated Email Summaries
Automatically summarize emails and send highlights to Slack channels.
Task: Summarize emails and send highlights to Slack
dexto --agent ./agents/examples/email_slack.yml
Loading...
What it does
This example demonstrates multi-tool orchestration:
- Connect to email via Gmail MCP server
- Fetch recent unread emails
- Summarize content using LLM
- Send formatted summaries to Slack channel
- Mark emails as read
Requirements
- Gmail access via Composio (SSE endpoint)
- Slack MCP server (
@modelcontextprotocol/server-slack) - Composio API setup for Gmail
- Slack bot token
- Agent configuration file
Setup
-
Configure Gmail access:
- Set up Composio for Gmail integration
- Get your Composio endpoint URL
- Configure authentication
-
Get Slack token:
- Create a Slack app
- Add bot token scopes:
chat:write,channels:read - Set
SLACK_BOT_TOKENandSLACK_TEAM_IDenvironment variables
-
Configure agent:
# agents/examples/email_slack.yml
mcpServers:
gmail:
type: sse
url: "your-composio-url"
slack:
type: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-slack']
env:
SLACK_BOT_TOKEN: $SLACK_BOT_TOKEN
SLACK_TEAM_ID: $SLACK_TEAM_ID
- Run the agent:
dexto --agent ./agents/examples/email_slack.yml
Customization
Modify the agent to:
- Filter emails by sender or subject
- Custom summary formats
- Schedule periodic checks
- Route to different Slack channels based on content
- Add reactions or threading