TurboDocx icon

TurboDocx

Interact with TurboDocx for document generation, e-signatures (TurboSign), quotes (TurboQuote), partner management, and webhooks

TurboDocx: Deliverable → Generate

AI-generated

Summary

Generates a new deliverable from a specified template by substituting variable placeholders with provided text or media.

Inputs

  • name (required) — Name for the generated deliverable (3-255 characters).
  • templateId (required) — UUID of the template to generate from.
  • variables (required) — JSON array of variables to substitute. Each item contains a placeholder string, the replacement text, and the MIME type (text/html/image/markdown).
  • additionalFields — Additional metadata for the deliverable, such as a description and an array of tags.

Output shape

A list of items containing the generated deliverable file.

The operation creates a binary file. The 'data' field of the output item contains the generated document.

Examples

Example 1: Generate a contract using a template named 'Employee_Contract'.

Template ID: '550e8400-e29b...', Name: 'John_Doe_Contract', Variables: '[{"placeholder":"{EmployeeName}","text":"John Doe","mimeType":"text"}]'

Example 2: Create a document with multiple variable substitutions.

Template ID: 'contract_v2', Name: 'Service_Agreement', Variables: '[{"placeholder":"{CompanyName}","text":"Acme Corp","mimeType":"text"},{"placeholder":"{EffectiveDate}","text":"2023-12-01","mimeType":"text"}]'

Links

Discussion