b24_documentgenerator_add
Generate a document from a CRM record and template by supplying template, entity type, and record IDs; returns the created document's download and PDF URLs.
Instructions
Generate a document from a template and CRM record (crm.documentgenerator.document.add).
Returns the created document (id, downloadUrl, pdfUrl, ...).
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": {
"template_id": "<template_id>",
"entity_type_id": "<entity_type_id>",
"entity_id": "<entity_id>"
},
"name": "b24_documentgenerator_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | No | Extra values to override/supply template placeholders. | |
| entity_id | Yes | Source record id whose data fills the template. | |
| template_id | Yes | Template id to render. | |
| webhook_url | No | Override the default incoming webhook for this call (https://<portal>/rest/<user_id>/<token>/). If omitted, uses personal_webhook, then the X-B24-Webhook HTTP header, then the BITRIX_WEBHOOK_URL env default. | |
| entity_type_id | Yes | CRM entity type id of the source (2=deal, 1=lead, 3=contact, 4=company, 1030+=SPA). | |
| personal_webhook | No | Act as a specific user (their personal incoming webhook). Takes precedence over webhook_url. Required to write to the portal under that user's permissions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |