Email with Oversight for Dust Assistants

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.

Built for Dust developers

Team-Level Email Guardrails

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.

Data Source to Email Pipeline

Dust assistants access company data sources. MultiMail provides the email delivery layer for data-driven communications — reports, summaries, and updates generated from connected data.

Multi-Assistant Email Coordination

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.

Audit Trail for External Communications

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.


Get started in minutes

Dust App Action for Sending Email
typescript
"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.

Check Inbox Action
typescript
"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.

Data-Driven Email Report
typescript
"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.


Step by step

1

Create a MultiMail Account and API Key

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_.

2

Set Up Your Dust Workspace

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.

3

Create Custom Email Actions

In your Dust workspace, define custom app actions that call the MultiMail REST API for send, inbox, and reply operations.

4

Configure Your Assistant

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.

5

Approve Pending Emails

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.


Common questions

Can Dust assistants send emails without approval?
Not in gated_send mode (the default). Every outbound email from a Dust assistant is queued for human approval in the MultiMail dashboard. You can switch to monitored or autonomous mode once you trust the assistant's email composition, but gated_send is recommended for team-facing assistants.
How do I prevent assistants from leaking internal data via email?
MultiMail's gated_send mode creates a review step where a team lead can inspect every outbound email for sensitive data before approving delivery. This prevents AI assistants from accidentally including confidential information in external communications.
Can multiple Dust assistants share a mailbox?
Yes. Multiple assistants can use the same MultiMail mailbox and API key. The audit log records which assistant triggered each email, and the gated_send queue shows all pending emails from all assistants in one view for efficient review.
Does MultiMail support team-specific mailboxes?
Yes. Create separate mailboxes for different teams or departments, each with their own oversight settings. A marketing assistant might use a mailbox in monitored mode while a finance assistant uses gated_all for stricter controls.

Explore more

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.