Messaging

Email

Each email trigger mints an address locked to one allowed sender, with attachments as files. The send step uses a fixed platform sender; approvals by link.

MadMax speaks email natively in both directions. There's nothing to connect: no SMTP server, no API key, no provider account. Inbound mail arrives at an address the trigger step mints for itself; outbound mail leaves from a fixed platform sender. (Reading and sending through your own Gmail account is a different thing: that's the Gmail connector in Settings → connectors.)

Start a workflow from an email

Drop an Email trigger on the canvas and the step mints its own address, something like wf-a1b2…@in.madmax.build, shown in the inspector with a copy button. Any email arriving there starts the workflow with the message as payload:

  • payload.from, payload.to, payload.subject, payload.text, payload.html, payload.message_id, payload.received_at
  • payload.files: attachments, stored durably and handed to downstream steps as file descriptors (key, filename, content_type, size). The AI extract task reads a PDF attachment with zero extra configuration.

Only the allowed sender can trigger it. Each email trigger is locked to the addresses in Allowed senders (prefilled with your login email; add more with commas). Mail from anyone else, including forged from-lines that fail SPF/DKIM/DMARC checks, is dropped before anything runs, silently, so nobody probing addresses learns anything.

For an inbox that auto-forwards everything to the step's address, set Accept mail from to any_authenticated: forwarded messages keep their original From line, so a sender whitelist can't match. Authentication is still required, and the step's address is now the secret, so don't publish it.

Limits: up to 10 attachments per message, each up to 10 MB, and bodies are clipped at 512 KB. The workflow must be active for the address to fire in production.

Testing it

Press run. The canvas waits, you email the step's address, and the delivery does double duty: the draft runs live in front of you, and the message is pinned as the step's sample so downstream steps have real fields to build against.

Send email from a workflow

The Send email step sends through MadMax's own sender, workflows@mail.madmax.build, with a templated to/subject and a markdown body:

To:       {{payload.from}}
Subject:  Re: {{payload.subject}}
Body:     Thanks, got it. We processed **{{payload.subject}}**.

Every field is Mustache-rendered against the payload. The body is markdown, rendered into the MadMax email chassis with a plain-text part generated automatically and a short "sent by an automated workflow" footer on both. Optional fields: Reply-to so responses land in your inbox, and a Button label plus Button URL for a single call-to-action.

Guardrails are built in: a per-workspace daily send cap (100 by default; going over is a step error, not a silent drop), at most five comma-separated recipients per send, and a fixed sender identity that workflow config can't spoof. In the Inspector's Test tab the step previews the rendered message instead of sending it.

Approvals by email

The Approval step can email the decision: set its channel to email and fill Notify, and the pause sends that address the prompt with one-click Approve / Reject links. No sign-in is needed, links are valid for seven days, and a double-click or a second approver landing late gets a calm "already decided" page. An expired link points the approver at the run page, where the in-app decision always works.

Related