box_docgen_create_batch_tool
Generate documents in bulk from a template using predefined data. Specify template ID, destination folder, data input, and output file type (PDF or DOCX) to create and process a batch efficiently.
Instructions
Create a new Box Doc Gen batch to generate documents from a template.
Args: client (BoxClient): Authenticated Box client. docgen_template_id (str): ID of the Doc Gen template. destination_folder_id (str): ID of the folder to save the generated document. document_generation_data (List[Dict[str, Any]]): Data for document generation. example: [ { "generated_file_name": "Image test", "user_input": { "order": { "id": "12305", "date": "18-08-2023", "products": [ { "id": 1, "name": "A4 Papers", "type": "non-fragile", "quantity": 100, "price": 29, "amount": 2900 }, ] } } }, ] output_type (str): Output file type (only, "pdf" or "docx").
Returns: dict[str, Any]: Response containing batch creation status and details. If successful, contains a message with batch ID. If an error occurs, contains an "error" key with the error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
destination_folder_id | Yes | ||
docgen_template_id | Yes | ||
document_generation_data | Yes | ||
output_type | No |