b24_documentgenerator_add
Generate a document from a CRM template and record. Returns the created document's ID, download URL, and PDF URL.
Instructions
Generate a document from a template and CRM record (crm.documentgenerator.document.add).
Returns the created document (id, downloadUrl, pdfUrl, ...).
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 |