Carbone
Advanced document generation service with multi-format template processing and dynamic data population.
Carbone Node
Powerful document generation integration using the Carbone.io API for creating professional documents from templates with dynamic data population and multi-format output support.
Available Operations
- Template Management: Upload, download, and delete document templates
- Document Generation: Create documents from templates with JSON data
- Format Conversion: Support for PDF, DOCX, XLSX, PPTX, and HTML output
- Localization: Multi-language and timezone support with currency conversion
Connection Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
apiToken | TEXT | Yes | Carbone.io API authentication token from your dashboard |
apiUrl | TEXT | Yes | Carbone.io API base URL (default: https://api.carbone.io) |
{
"apiToken": "{{ctx.consts.CARBONE_API_TOKEN}}",
"apiUrl": "{{ctx.consts.CARBONE_API_URL}}"
}Template Management Operations
uploadTemplate
Upload a document template to Carbone.io service for later use in document generation.
| Parameter | Type | Required | Description |
|---|---|---|---|
templateFile | OBJECT | Yes | Template file with name, MIME type, and base64 data |
templateName | TEXT | No | Optional display name for the template |
{
"templateFile": {
"name": "invoice-template.docx",
"type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"data": "{{ctx.nodes.fileUpload.outputs.base64Data}}"
},
"templateName": "Invoice Template {{ctx.vars.version}}"
}Supported Template Formats:
- Microsoft Office: DOCX, XLSX, PPTX, DOC, XLS, PPT
- OpenDocument: ODT, ODS, ODP
- Web formats: HTML, MD, TXT, XML, RTF
downloadTemplate
Retrieve a previously uploaded template from Carbone.io.
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | TEXT | Yes | Template ID to download |
{
"templateId": "{{ctx.vars.templateId}}"
}deleteTemplate
Permanently remove a template from Carbone.io service.
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | TEXT | Yes | Template ID to delete |
{
"templateId": "{{ctx.vars.templateId}}"
}Document Generation Operations
generateDocument
Generate a document from an uploaded template using dynamic data with advanced formatting and localization options.
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | TEXT | Yes | Template ID for document generation |
data | OBJECT | Yes | JSON data to populate template variables |
convertTo | TEXT | No | Output format: pdf, docx, xlsx, pptx, html |
timezone | TEXT | No | Timezone for date formatting (e.g., Europe/Paris) |
lang | TEXT | No | Language code for localization (e.g., en, fr, de) |
currencySource | TEXT | No | Source currency code for conversion (e.g., USD) |
currencyTarget | TEXT | No | Target currency code for conversion (e.g., EUR) |
currencyRates | TEXT | No | Custom currency exchange rates as JSON string |
returnType | TEXT | No | Return format: "data" (document content) or "link" (download URL) |
{
"templateId": "{{ctx.vars.invoiceTemplateId}}",
"data": {
"company": {
"name": "{{ctx.user.company}}",
"address": "{{ctx.user.address}}"
},
"invoice": {
"number": "INV-{{ctx.vars.invoiceNumber}}",
"date": "{{ctx.vars.invoiceDate}}",
"dueDate": "{{ctx.vars.dueDate}}"
},
"customer": {
"name": "{{ctx.vars.customerName}}",
"email": "{{ctx.vars.customerEmail}}"
},
"items": "{{ctx.nodes.itemsProcessor.outputs.lineItems}}",
"totals": {
"subtotal": "{{ctx.nodes.calculator.outputs.subtotal}}",
"tax": "{{ctx.nodes.calculator.outputs.tax}}",
"total": "{{ctx.nodes.calculator.outputs.total}}"
}
},
"convertTo": "pdf",
"lang": "{{ctx.user.locale}}",
"timezone": "{{ctx.user.timezone}}"
}Workflow Integration
Use workflow context to create dynamic document generation:
{
"templateId": "{{ctx.nodes.templateManager.outputs.templateId}}",
"data": {
"document": {
"title": "{{ctx.vars.documentType}} - {{ctx.user.company}}",
"generatedAt": "{{ctx.vars.currentDateTime}}"
},
"content": "{{ctx.nodes.dataCollector.outputs.processedData}}"
},
"convertTo": "{{ctx.vars.outputFormat}}",
"returnType": "data"
}Template Variable Syntax
| Pattern | Description | Example |
|---|---|---|
{d.field} | Simple data access | {d.company.name} |
{d.array[i].field} | Array iteration | {d.items[i].description} |
{d.field:formatters} | Value formatting | {d.amount:format(.2f)} |
{d.show:condition} | Conditional display | {d.show(d.total>0):hideBlock} |
{d.date:convDate()} | Date conversion | {d.createdAt:convDate(DD/MM/YYYY)} |
Response Format
Success Response
{
"success": true,
"templateId": "template_abc123",
"documentData": "base64EncodedContent...",
"contentType": "application/pdf"
}Error Response
{
"success": false,
"error": "Template not found",
"code": "TEMPLATE_NOT_FOUND"
}Use Cases
- Invoice Generation: Create professional invoices with dynamic customer and line item data
- Report Creation: Generate reports from database queries and analytics data
- Contract Automation: Produce contracts with customer-specific terms and conditions
- Certificate Generation: Create certificates and awards with personalized information
- Proposal Creation: Generate business proposals with dynamic pricing and content
- Document Templates: Standardize document creation across business processes