Manage email outreach queue
manage_email_outreach_queueBulk operations (status, approve-all, cancel_all) act on the current agent's queue when run inside an agent, and across the whole account from account-level chat — except a bulk cancel_all or approve-all, which from account-level chat is rejected unless agent_id names the campaign, so it can't hit every campaign at once. Targeting one person by recipient_email reaches them in any agent. The next send time and per-mailbox usage stay account-wide (the send rate is per-mailbox).
For pausing/resuming the campaign, use update_agent to set the agent status to 'paused' or 'active' instead. Dict with action result and current queue status
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "manage_email_outreach_queue"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | For 'update' — new body text. | |
| action | Yes | One of: - 'status': Get full queue details (queued and failed items, plus sent counts). The `pending_items` / `pending_approval_items` / `failed_items` lists cap at 50 each, each with a matching `*_truncated` flag — when a list's flag is True, pass `offset` (offset += 50) to read the next page. Each `failed_items` row (newest first) carries `last_error`, the reason that send failed — read it to answer "why wasn't X emailed?"; when X is in none of these lists, their outreach may have been cancelled, so read 'list_cancelled'. Each item carries the `mailbox` it sends from; the account-level `mailboxes` list gives each mailbox's remaining daily headroom. The top-level `cancelled_by_kind` maps each cancel cause to its count (`recipient_replied`, `task_deleted`, `auto_shelved`, …; pre-taxonomy rows under `unknown`) — read it to answer "how much outreach was cancelled, and why?". - 'list_cancelled': List cancelled emails, newest first, in the 'status' item shape. Each row's `cancel_kind` is why it was cancelled, `rejection_reason` is the user's own reason when they declined it, and `last_error` is its last note — usually the cancel's explanation, though some cancels leave an earlier failure or hold note there, so state the cause from `cancel_kind`. Caps at 50 per page with a `cancelled_truncated` flag; page with `offset` like 'status'. - 'update': Edit a queued email's subject and/or body. Requires recipient_email. Pass subject and/or body to change — no cancel-and-re-queue needed. Send order is derived, not per-row scheduled; to pause or resume the campaign use update_agent (see the note above). A draft on a step running an A/B test carries `ab_version` ('A', 'B', or 'left_out' when its send won't count) on its status row and in this action's result; updating one takes ab_version too — the version the edited draft reads as — or ab_version alone to re-file it unedited. - 'approve': Send authorization belongs to the user, so this action needs a message that arrived after the drafts were queued and explicitly says to approve or send them. A message from before the drafts existed cannot authorize them — a request to review them, to approve them later, or to be able to approve from chat means: report that the queue is awaiting approval and end your turn; the user's next message decides. Once authorized: if recipient_email is given, approve only that item, otherwise approve ALL pending_approval items. An email whose subject or body still holds a [[slot]] for the user to fill in stays awaiting approval and comes back in `still_held` with the slot to fill: tell the user, or fill it with 'update' once they give you the wording. From account-level chat an approve-all is rejected unless agent_id names the campaign — it must not fire every campaign's drafts into sending at once. - 'cancel': Cancel a queued email. Pass recipient_email to cancel that one person. To cancel the ENTIRE pending queue — which drops drafts the user already approved — you must pass cancel_all=True; an unscoped cancel without it is rejected. From account-level chat a cancel_all is rejected unless agent_id names the campaign to cancel — it must not clear every campaign's queue at once. | |
| offset | No | For 'status' and 'list_cancelled' — skip this many items in each list before returning the next 50. Use it to page through a queue larger than 50 (offset=50 for items 51-100, etc.). | |
| subject | No | For 'update' — new subject line. | |
| agent_id | No | For 'cancel' and 'approve' — scope a bulk cancel_all / approve-all to one campaign's queue. Required from account-level chat (no active agent) and in any call with on_behalf_of, where an unscoped bulk cancel or approve is rejected; call list_agents to get the id (list_team_shared_agents for a teammate's campaigns). | |
| ab_version | No | Required for 'update' of a draft in an A/B test — the version the edited draft now reads as: 'A', 'B', or 'left_out' when it fits neither, so its send isn't counted in the test; its current version when the edit doesn't change that. Omit for a draft not in a test. | |
| cancel_all | No | For 'cancel' only — confirm a queue-wide cancel when no recipient_email is given. Guards against silently tearing down the whole campaign. | |
| on_behalf_of | No | A teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account. | |
| recipient_email | No | For 'update', 'approve', and 'cancel' — target a specific recipient. Leave empty to apply to all items (not valid for 'update'; for 'cancel', requires cancel_all=True). |