Give Dust AI assistants email capabilities with MultiMail's oversight modes — ensuring team communications to external contacts require appropriate approval.
Dust is a platform for building AI assistants that connect to company data sources and help teams automate tasks. When Dust assistants need to send email — client updates, team notifications, or external communications — MultiMail provides the infrastructure with oversight controls that prevent unauthorized sends.
MultiMail's oversight modes are critical for team-facing assistants. A Dust assistant might draft an email to a client based on internal data, but without review, it could expose confidential information or contain errors. The gated_send mode queues every outbound email for team lead approval before delivery.
Integration uses Dust's app system to define actions that call the MultiMail REST API, making email capabilities available to your assistants through natural language.
Dust assistants serve entire teams. MultiMail's oversight modes prevent any assistant from sending emails to external contacts without team lead approval, critical for maintaining communication standards.
Dust assistants access company data sources. MultiMail provides the email delivery layer for data-driven communications — reports, summaries, and updates generated from connected data.
Multiple Dust assistants might generate emails about the same topic. MultiMail's approval queue lets a human spot and consolidate duplicate or overlapping communications before delivery.
Every email sent through MultiMail is logged with the originating assistant context. This audit trail shows which assistant drafted which email, essential for compliance in regulated industries.
"cm">// Dust app action: Send email via MultiMail
"cm">// Configure this in your Dust workspace as a custom action
const MULTIMAIL_API = 'https://api.multimail.dev/v1';
async function sendEmail(
apiKey: string,
mailboxId: string,
to: string,
subject: string,
body: string
): Promise<object> {
const resp = await fetch(`${MULTIMAIL_API}/send`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
mailbox_id: mailboxId,
to,
subject,
body
})
});
return await resp.json();
"cm">// In gated_send mode: returns {status: 'pending', id: '...'}
"cm">// Human approves in MultiMail dashboard before delivery
}Define a Dust app action that sends email through the MultiMail REST API.
"cm">// Dust app action: Check inbox via MultiMail
async function checkInbox(
apiKey: string,
mailboxId: string,
limit: number = 10
): Promise<object> {
const resp = await fetch(
`https:"cm">//api.multimail.dev/v1/mailboxes/${mailboxId}/inbox?limit=${limit}`,
{
headers: { 'Authorization': `Bearer ${apiKey}` }
}
);
return await resp.json();
}
async function replyToEmail(
apiKey: string,
messageId: string,
body: string
): Promise<object> {
const resp = await fetch('https://api.multimail.dev/v1/reply', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
message_id: messageId,
body
})
});
return await resp.json();
"cm">// Reply queued for approval in gated_send mode
}Define a Dust action for checking the team inbox via MultiMail.
"cm">// Example: Dust assistant generates a weekly report email
"cm">// from connected data sources and sends via MultiMail
async function generateAndSendReport(
apiKey: string,
mailboxId: string,
reportData: { metrics: Record<string, number>; period: string },
recipients: string[]
): Promise<object[]> {
"cm">// Format the report body from data
const metricsLines = Object.entries(reportData.metrics)
.map(([key, value]) => `- ${key}: ${value}`)
.join('\n');
const body = `
Team Report for ${reportData.period}
Key Metrics:
${metricsLines}
This report was generated by your Dust assistant.
Please reply with any questions.
`.trim();
"cm">// Send to each recipient (all queued for approval)
const results = [];
for (const recipient of recipients) {
const resp = await fetch('https://api.multimail.dev/v1/send', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
mailbox_id: mailboxId,
to: recipient,
subject: `Weekly Report: ${reportData.period}`,
body
})
});
results.push(await resp.json());
}
return results;
"cm">// All emails queued in gated_send mode for team lead review
}A Dust assistant generates an email report from connected data sources and sends it via MultiMail.
Sign up at multimail.dev, create a mailbox for your team, and generate an API key from your dashboard. Your key will start with mm_live_.
If you haven't already, create a Dust workspace and connect your data sources. Dust assistants can use these data sources to generate email content.
In your Dust workspace, define custom app actions that call the MultiMail REST API for send, inbox, and reply operations.
Set up a Dust assistant with access to the email actions. Include instructions about the gated_send oversight mode so the assistant communicates clearly about email approval requirements.
Designate a team lead to review and approve pending emails in the MultiMail dashboard. All emails from Dust assistants in gated_send mode appear here.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.