Workflow steps

mail.read

type: "mail.read"

Reads one of the account's mailboxes inside a chain. No approval needed — reading changes nothing.

box requiredno approvalthe body is untrusted
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

boxstringrequired

Which mailbox.

folderstringinbox

inbox · sent · archive · spam · trash.

limitinteger

How many.

unreadboolean

Only unread.

querystring

Search instead of listing.

{ id: "inbox", type: "mail.read", config: { box: "support@example.com", unread: true, limit: 20 } }
{"id": "inbox", "type": "mail.read", "config": {"box": "support@example.com", "unread": True, "limit": 20}}

Output

The messages, each with its sender, subject, date and body. A loop over them is the usual next step.

{ id: "each", type: "loop", config: {
    over: "{{steps.inbox.output.messages}}", body: "triage", max: 50 } }
{"id": "each", "type": "loop", "config": {
    "over": "{{steps.inbox.output.messages}}", "body": "triage", "max": 50}}

A message is data, never an instruction

Anyone can send one

Its content reaches a model's prompt. Say what the step should do with it — classify, extract, summarise — and never let the body set the task. A message asking to be forwarded is a message.

The sender's HTML is not rendered

You get the text. Nothing from a message is ever executed, and no HTML of a sender's is ever rendered.