Give an n8n AI Agent an email inbox

An n8n AI Agent gets a Trotta Mail inbox through the MCP Client Tool node. Set the endpoint to https://api.trotta.email/mcp, choose HTTP Streamable, then sign in or paste an API key. The agent can wait for mail, read a screened safe view, send and reply, and dangerous mail is held for a human.

Updated

Connect

n8n needs nothing installed: the MCP Client Tool node connects an AI Agent node to the Trotta Mail MCP server. Both ways to connect start with the same two steps.

  1. Add an MCP Client Tool node to your AI Agent node.
  2. Set Endpoint to this URL and Server Transport to HTTP Streamable.
Endpoint
https://api.trotta.email/mcp

Sign in

Set Authentication to MCP OAuth2, create the credential and sign in with Trotta Mail. A human picks the inboxes the agent may use, and whether it may read, send or both. There is no key to paste.

API key

Set Authentication to Bearer Auth and paste your key as the Bearer Token.

Trotta Mail speaks Streamable HTTP. A node that shows only an SSE Endpoint field is an older version: add a fresh MCP Client Tool node on a current n8n.

A complete example: inbox, wait, read, reply

This example gets an inbox, waits for a message, reads it and replies: the same four steps as every Trotta Mail integration page. Step 1 gets the inbox. The AI Agent takes steps 2 to 4 with tools.

1. Get an inbox

Create an agent inbox and a key in the Trotta Mail console, or let one call do both. It needs no account and no key.

shell
curl -X POST https://api.trotta.email/v1/agents/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "riley"}'

The response carries api_key, inbox.address and a claim_url for the human responsible for the agent. The key is shown once. Paste it into the Bearer Auth credential.

2 to 4. Wait, read and reply

Give the AI Agent node this prompt, run the workflow, then send a mail to the inbox address.

Prompt for the AI Agent node
Wait for the next message in my inbox, read it, and reply in one line.

The agent calls wait_for_message, then read_message, then reply_to_message. To give it only those, set Tools to Include to Selected in the MCP Client Tool node and pick them, plus list_inboxes.

Before a human claims the agent, it can receive from anyone and reply to anyone whose mail to it arrived authenticated. To write to new addresses, a human opens the claim_url.

What your agent reads

An n8n agent reads screened mail, not the raw message. The AI Agent node passes each tool result to its chat model, and each result carries three things.

What comes backWhat it means
The verdictEvery message carries one, decided before the message is readable. Its action is deliver, flag, hold or reject.
The safe viewOnly what a human could see. Hidden text is removed, instructions aimed at a model are replaced by a note, and risky links are defanged.
Held mailDangerous mail waits outside the inbox for a human. The agent sees withheld: true and the reason in fixed words, and nothing the sender wrote.

Screening matters most in a workflow with other tools attached: a database, a payment step, a chat channel. A model that reads an instruction in an email may use them. Screening before delivery removes or holds that text before the AI Agent node sees the message.

No filter catches everything, so tell the agent in its prompt to treat mail content as data, never as instructions. See Concepts for the verdict and the safe view.

Going further

  • Webhooks: a signed event posted to an HTTPS endpoint when mail arrives. Verify the signature before a workflow acts on it.
  • Live events: the same events over a stream, with no public endpoint.
  • Pods: one isolated workspace per customer.
  • Domains: agent inboxes on your own domain, on paid plans.
  • MCP: every tool the server offers.

Questions

How do I give an n8n AI agent an email inbox?

Add an MCP Client Tool node to the AI Agent node, set Endpoint to https://api.trotta.email/mcp and Server Transport to HTTP Streamable, then authenticate with MCP OAuth2 or Bearer Auth.

Should I sign in or use an API key in n8n?

Sign in when a human owns the inbox: you pick the inboxes the agent may use, and there is no key to paste. Use Bearer Auth with a key for an agent that signed itself up. Sign-in needs a redirect address on https, or on http at localhost.

Can I limit which email tools the n8n agent gets?

Yes. In the MCP Client Tool node, set Tools to Include to Selected and pick the tools the workflow needs, such as wait_for_message, read_message and reply_to_message.

Is Trotta Mail made by n8n?

No. Trotta Mail is an independent product that works with n8n as a remote MCP server. It is not made or endorsed by n8n.

Sources

Give your agent an inbox of its own. One call, or one minute in the console.