zammad_create_shared_draft
Create or overwrite a Zammad ticket’s shared draft as a Reply-All email, automatically deriving recipients, subject, and quoted history from the latest customer article.
Instructions
Create or overwrite the shared draft of a Zammad ticket as a Reply-All email. Auto-detects the most recent customer article and derives to/cc/subject/in_reply_to from it: to is its sender, cc its other To and Cc recipients without ZAMMAD_SELF_EMAILS. Renders the agent's signature fresh from Zammad (with placeholder substitution and lazy loading of related objects) and appends the original article as a localised , by default stripped of the conversation history the sender quoted themselves (quote_history). PUT semantics: any existing draft on the ticket is overwritten, unless keep_existing is true. The signature defaults to the one configured on the ticket's group. reply_html validation (always on for universal rules, conditional for configured ones): - universal: no top-level , no , no typed bullet lists (lines starting with - – • *; use ), no ASCII straight quotes ", no ASCII apostrophe ' inside words - when ZAMMAD_BANNED_NAMES is set: body must not contain any banned name - when ZAMMAD_REQUIRED_GREETING is set: body must contain that greeting
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": {
"ticket_id": "<ticket_id>",
"reply_html": "<reply_html>"
},
"name": "zammad_create_shared_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sign_as | No | Login or e-mail of the agent whose name goes into signature and From display name (default: ZAMMAD_SIGN_AS, else the token owner). For service accounts drafting on behalf of a person. | |
| extra_cc | No | Additional CC addresses to add on top of the automatic Reply-All set. | |
| ticket_id | Yes | Zammad ticket ID (numeric, from URL: /#ticket/zoom/<id>). | |
| reply_html | Yes | Reply body as HTML with a nested <div> structure. Example: <div><div>Hello Mr Smith,</div><div><br></div><div>thank you for your message ...</div><div><br></div><div>Best regards</div></div>. Lists: <div><ul><li>First</li><li>Second</li></ul></div> with <div><br></div> before and after — never lines starting with a dash. End with the greeting; the empty line before the signature is added automatically. | |
| quote_locale | No | Locale for the quote block lead-in. 'en' → "On Tuesday, 9 June 2026 at 10:00:00, X wrote:". 'de' → "Am Dienstag, 09. Juni 2026 um 10:00:00, schrieb X:". When omitted, falls back to ZAMMAD_QUOTE_LOCALE (server default). | |
| signature_id | No | Signature ID from /signatures. When omitted, the signature of the ticket's group is used (fallback 1). Zammad appends the group signature again below the quote if a different one is set. | |
| keep_existing | No | If true and the ticket already has a shared draft, leave it untouched and return error DRAFT_EXISTS instead of overwriting it (for automated runs). | |
| quote_history | No | How much of the referenced article to quote. 'trim' keeps only what the sender wrote in that message and drops the conversation history they quoted themselves — keeps long threads short. 'full' quotes the article verbatim. When omitted, falls back to ZAMMAD_QUOTE_HISTORY (server default: 'trim'). |