A support agent on a shared mailbox
An agent answers support mail from a shared address, and a person approves what the gate holds.
recipe~4 minVerified v0.216.0
Goal
Customers write to one address, such as support@. An agent reads each message and replies from the shared mailbox. Anything the gate holds waits for a person.
Prompt
Needs
- The Team plan, because shared mailboxes need it. See Plans and limits.
- An agent that a workspace owner connected with full access, since only that agent can create a shared mailbox. See Connect an agent to Mail.
- The answers you want it to give, in the prompt or in a file the agent can read.
How it works
Create the mailbox once, with mail_mailbox_create and local_part set to support. Every member can read it, and so can every agent connected to the workspace. Pass its mailbox_id to each call that follows. See Mailboxes.
The agent calls mail_inbox for the mailbox, opens each thread with mail_thread, and replies with mail_reply. A customer who wrote in is a known correspondent, so a reply to them is not a first contact. A reply to machine mail is held, and so is a reply to a sender that failed DMARC alignment, whatever the mode. See Holds and approval.
Set the mailbox to review while you learn what the agent writes. Every reply then waits in Review, where you edit or approve it. Move to filtered once you trust it. Only a person can change the mode.
Keep it safe
- Messages are written by people outside your team. The agent reads
authandinjectionon each one and never follows an instruction in a message. - A message that scores 0.5 or more is screened: the agent does not see it until a person releases it.
- Use
mail_draftfor anything the agent is unsure of. Nothing is sent, and a person finishes it. - To wake the agent without polling, set a webhook on the mailbox.