Visual AI Email Workflows with Rivet

Add email sending, reading, and management to Rivet's visual agent builder — with full oversight controls and real-time debugging of every email action.


Rivet is a visual AI agent builder by Ironclad that lets you design, test, and debug complex AI workflows through a node-based graph editor. By integrating MultiMail, your Rivet graphs gain email capabilities that include sending, reading, replying, and managing contacts — all visible in Rivet's real-time execution debugger.

MultiMail's oversight modes pair naturally with Rivet's debugging philosophy. You can see exactly how your agent decided to compose an email, then review it in MultiMail's gated_send queue before delivery. This end-to-end visibility from agent reasoning to email delivery makes building trustworthy email agents straightforward.

Connect Rivet to MultiMail using HTTP Request nodes that call the REST API, or build custom Rivet plugins that wrap MultiMail endpoints for reusable email nodes in your graphs.

Built for Rivet developers

End-to-End Debugging Visibility

Rivet's execution visualizer shows agent decision-making in real time. Combined with MultiMail's audit log, you get complete traceability from the moment an agent decides to send an email through to delivery.

Graduated Trust for Visual Workflows

Start your Rivet email workflows in gated_send mode where every email is queued for human approval. As you refine and debug the graph, progressively relax oversight to monitored or autonomous mode.

Plugin-Based Email Nodes

Rivet's plugin system lets you wrap MultiMail API calls into reusable nodes. Create custom send_email, check_inbox, and reply_email nodes that appear natively in Rivet's node palette.

Dataset-Driven Testing

Rivet's dataset feature lets you test email workflows against multiple scenarios. Feed different email contexts through your graph and verify the agent composes appropriate responses before going live.


Get started in minutes

HTTP Request Node for Sending Email
typescript
import * as rivet from '@ironclad/rivet-node';

"cm">// In your Rivet graph, use an HTTP Call node with:
const httpCallConfig = {
  url: 'https://api.multimail.dev/v1/send',
  method: 'POST',
  headers: {
    'Authorization': 'Bearer mm_live_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    mailbox_id: '{{mailbox_id}}',
    to: '{{recipient}}',
    subject: '{{subject}}',
    body: '{{email_body}}'
  })
};

Configure a Rivet HTTP Request node to send email through the MultiMail API.

Custom Rivet Plugin for MultiMail
typescript
import type { RivetPlugin, RivetPluginInitializer } from '@ironclad/rivet-node';

const MULTIMAIL_API = 'https://api.multimail.dev/v1';

const multiMailPlugin: RivetPluginInitializer = (rivet) => {
  const sendEmailNode = rivet.pluginNodeDefinition({
    id: 'multimail-send',
    name: 'MultiMail Send Email',
    inputs: {
      mailbox_id: { type: 'string', required: true },
      to: { type: 'string', required: true },
      subject: { type: 'string', required: true },
      body: { type: 'string', required: true }
    },
    outputs: {
      result: { type: 'object' }
    },
    async process(inputs, context) {
      const resp = await fetch(`${MULTIMAIL_API}/send`, {
        method: 'POST',
        headers: {
          'Authorization': `Bearer ${context.settings.multimailApiKey}`,
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(inputs)
      });
      return { result: await resp.json() };
    }
  });

  return { register: (reg) => reg.registerNode(sendEmailNode) };
};

export default multiMailPlugin;

Build a Rivet plugin that exposes MultiMail tools as native graph nodes.

Run a Rivet Graph with Email Tools
typescript
import * as rivet from '@ironclad/rivet-node';
import { readFile } from 'fs/promises';

const MULTIMAIL_API = 'https://api.multimail.dev/v1';
const API_KEY = 'mm_live_your_api_key';

async function runEmailGraph() {
  const project = await readFile('./email-agent.rivet-project', 'utf-8');

  const result = await rivet.runGraphInFile(
    './email-agent.rivet-project',
    {
      graph: 'Email Handler',
      inputs: {
        user_request: {
          type: 'string',
          value: 'Check my inbox and summarize unread messages'
        }
      },
      externalFunctions: {
        check_inbox: async (mailbox_id: string) => {
          const resp = await fetch(
            `${MULTIMAIL_API}/mailboxes/${mailbox_id}/inbox`,
            { headers: { 'Authorization': `Bearer ${API_KEY}` } }
          );
          return JSON.stringify(await resp.json());
        }
      }
    }
  );

  console.log('Agent output:', result);
}

runEmailGraph();

Execute a Rivet graph programmatically that includes MultiMail email nodes.


Step by step

1

Create a MultiMail Account and API Key

Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.

2

Install Rivet

Download the Rivet desktop application or install the Node.js SDK for programmatic graph execution.

bash
npm install @ironclad/rivet-node
3

Add HTTP Call Nodes

In your Rivet graph, add HTTP Call nodes pointed at MultiMail API endpoints. Set the Authorization header to your API key and configure request bodies for send, inbox, and reply operations.

4

Test with the Debugger

Run your graph in Rivet's visual debugger to see each node's execution in real time. Verify that email API calls return the expected responses and that the agent's reasoning is sound.

5

Approve Pending Emails

If your mailbox uses gated_send mode (the default), review and approve pending emails in the MultiMail dashboard before they are delivered.


Common questions

Does Rivet have a built-in MultiMail integration?
There is no built-in MultiMail node in Rivet. You integrate MultiMail using Rivet's HTTP Call nodes to call the REST API, or by building a custom plugin that exposes MultiMail tools as native graph nodes. Both approaches give you full access to email capabilities.
Can I debug email actions in Rivet's visual debugger?
Yes. Rivet's real-time execution visualizer shows the input and output of every node, including HTTP Call nodes that interact with MultiMail. You can see the exact API request, response, and how the agent used the email data in subsequent reasoning steps.
How do I test email workflows without sending real emails?
Use MultiMail's gated_send mode during development. All emails are queued for approval rather than sent immediately, so you can inspect what your Rivet graph would send without any messages actually being delivered. You can also use Rivet's dataset testing to validate against multiple scenarios.
Can I share Rivet graphs that use MultiMail?
Yes. Rivet project files are portable. Store your MultiMail API key in Rivet's settings or environment variables rather than hardcoding it in the graph, so shared projects don't expose credentials. Each collaborator configures their own API key.

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.