Email Infrastructure for Superblocks AI Workflows

MultiMail provides the email backend your Superblocks automations need — with delivery policy enforcement, approval queues, and audit trails built in.


Superblocks lets engineering teams build internal tools, approval dashboards, and operational automations on top of their existing data sources. When those automations need to send, receive, or route email — especially email triggered by AI agents — you need a backend that enforces delivery policy, not just one that calls an SMTP relay.

MultiMail exposes a REST API designed for programmatic agents. Every call to `send_email`, `reply_email`, or `decide_email` is subject to the oversight mode you configure per mailbox. In a Superblocks workflow, that means you can gate agent-drafted emails through a human approval step before delivery, or run fully autonomously once you've validated the agent's behavior.

The typical pattern is a Superblocks workflow that invokes MultiMail's REST API via its built-in HTTP integration. The workflow handles the business logic — routing, escalation, record updates — while MultiMail handles the email primitives and enforces the delivery contract.

Built for Superblocks developers

Approval-aware email primitives

MultiMail's `gated_send` and `gated_all` oversight modes hold outbound email in a pending queue until a human approves via `decide_email`. Your Superblocks approval UI can drive that decision without needing to rebuild delivery gating logic.

Webhook-driven inbound routing

Inbound email to any `@multimail.dev` or custom-domain mailbox fires a webhook your Superblocks workflow can consume. Route support tickets, parse structured replies, or trigger downstream automations based on email content — without polling.

Audit trail for every agent action

Every `send_email`, `reply_email`, and `decide_email` call is logged with the mailbox, agent identity, and approval status. Enterprises subject to SOC 2 or internal change-management policies get a full record without extra instrumentation.

Mailbox isolation per workflow or tenant

Use `create_mailbox` to provision a dedicated mailbox per Superblocks application, customer segment, or environment. Inbound and outbound traffic stays isolated, and quota limits are enforced at the mailbox level.

Formally verified security model

MultiMail's oversight, identity, and authorization logic is verified in Lean 4. For enterprise workflows handling sensitive operational email, that means the delivery gating behavior is provably correct — not just tested.


Try it with your agent

No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.

1. Get MultiMail ready first: read https://multimail.dev/llms.txt, connect the MultiMail MCP server to this agent, create one free inbox for this Superblocks project, and set up a verified sending domain. Keep the project in gated_send oversight mode so every outbound message requires developer review before it sends. 2. In Superblocks, use Clark AI with real Superblocks building blocks: create a Workflow or backend APIs, use Superblocks Integrations as the data access layer, and tag the relevant integration in Clark with @ when prompting. Do not invent a direct MultiMail endpoint; use only the MultiMail MCP server and the capabilities documented in llms.txt for inboxes, verified sending, composing, sending, scheduling, and oversight modes. 3. Add three Superblocks actions for the agent: inbox-check to read recent messages from the MultiMail inbox, draft-reply to compose a response without sending it, and send to submit an approved or scheduled email through MultiMail. Make the send action refuse to run unless gated_send approval is present. 4. Send a test email from the verified sender to the free inbox, run inbox-check, create a draft-reply, show me the generated subject/body/recipient, and wait for my approval before invoking send. 5. After the test succeeds, leave the workflow deployed in gated_send, document the inbox, sender, approval rule, and where Superblocks records the run history so delivery policy enforcement, approval queues, and audit trails stay reviewable.

Step by step

1

Create a MultiMail account and generate an API key

Sign up at multimail.dev, choose a plan (Starter is free), and generate a live API key from the dashboard. Copy the `mm_live_...` key — you will store it as a Superblocks environment variable.

2

Store the API key in Superblocks environment variables

In your Superblocks organization settings, add `MULTIMAIL_API_KEY` as a secret environment variable. Reference it in API steps as `Env.MULTIMAIL_API_KEY`. Never hardcode the key in a workflow definition.

3

Provision a mailbox for your workflow

Call `create_mailbox` once to provision the address your workflow will send from and receive at. Set `oversight_mode` to `gated_send` while you validate behavior, then switch to `monitored` or `autonomous` once you're confident.

4

Add an HTTP API step to your Superblocks workflow

In the Superblocks workflow editor, add a REST API step pointing to `https://api.multimail.dev/send_email`. Set the Authorization header to `Bearer {{Env.MULTIMAIL_API_KEY}}` and build the request body from your workflow's input variables.

5

Build the approval dashboard (optional for gated_send)

If you are using `gated_send`, create a Superblocks app with a table bound to a `list_pending` query and Approve / Reject buttons that call `decide_email`. This is your human-in-the-loop review interface for agent-drafted email.


Common questions

Does MultiMail work with Superblocks' native REST API integration?
Yes. MultiMail's API follows standard REST conventions with JSON request and response bodies. Any Superblocks API step that can set an Authorization header and POST JSON can call MultiMail endpoints. No custom connector is required.
Can I trigger a Superblocks workflow when an email arrives?
Yes. When creating a mailbox, set the `webhook_url` field to a Superblocks webhook endpoint. MultiMail will POST inbound email payloads to that URL, including sender, subject, body, and any extracted metadata. Superblocks can then fan out to database writes, API calls, or notifications.
How do I gate agent emails so a human reviews them before delivery?
Create the mailbox with `oversight_mode: 'gated_send'`. Any `send_email` call from that mailbox will be held in the pending queue rather than delivered. Build a Superblocks table that queries `list_pending` and add buttons that call `decide_email` with `decision: 'approve'` or `decision: 'reject'`.
What happens if a Superblocks workflow fails after calling send_email?
If the mailbox is in `gated_send` mode, the message stays in the pending queue and will not deliver until explicitly approved via `decide_email`. If it is in `autonomous` mode and the call returned a 200, the email has already been queued for delivery. Use `cancel_message` within the same workflow to retract it if a subsequent step fails.
Can I use MultiMail with Superblocks' approval flow feature?
Yes, and this is a natural pairing. A Superblocks approval step can gate the Superblocks-side workflow, while MultiMail's `gated_send` mode gates the email delivery itself. You can use both independently or chain them — for example, require a Superblocks approval before the workflow even calls `send_email`, and then use MultiMail's approval as a second confirmation step.
Does MultiMail support custom domains for Superblocks enterprise deployments?
Yes. You can provision mailboxes on your own domain (e.g., `ops-agent@yourcompany.com`) by adding MultiMail's MX records to your DNS configuration. Custom domain mailboxes behave identically to `@multimail.dev` addresses and support the same oversight modes and webhook configurations.
Is there a Superblocks-specific SDK or plugin?
No dedicated plugin is needed. Superblocks' built-in HTTP integration handles all MultiMail API calls. If you prefer to call MultiMail from a Superblocks Python step, use the REST API directly with `requests` or `httpx` — the JSON request and response shapes are the same as the HTTP integration. There is no separate Python SDK to install; the REST API is sufficient for every workflow pattern.

Explore more

The only agent email with a verifiable sender

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