Document Utilities
A comprehensive toolset for AI workers to create, convert, and manage documents without requiring external integrations.
Overview
Document Utilities enable AI workers to generate PDFs, convert images, merge and split documents, and send files via email—all without needing external document processing services.
- Maximum file size: 50MB per file
- Supports idempotency to prevent duplicate operations
- All generated files are stored securely and downloadable from the Files page
- Email attachments require SMTP email integration
Available Tools
doc.markdownToPdf
Convert Markdown content to a styled PDF document
Use case: Generate reports, documentation, or formatted content from Markdown text
Parameters:
doc.htmlToPdf
Convert HTML content with CSS styling to PDF
Use case: Create branded documents, invoices, or styled layouts
Parameters:
doc.textToPdf
Convert plain text to a simple PDF document
Use case: Export logs, notes, or plain text content
Parameters:
doc.renderTemplateToPdf
Render a Handlebars template with data to PDF
Use case: Generate personalized letters, invoices, contracts with variable data
Parameters:
doc.imageConvert
Convert images between JPEG, PNG, and WebP formats
Use case: Optimize images for web or convert between formats
Parameters:
doc.imagesToPdf
Combine multiple images into a single PDF
Use case: Create photo albums, image compilations, or scanned document bundles
Parameters:
doc.mergePdfs
Merge multiple PDF files into one document
Use case: Combine reports, invoices, or documents
Parameters:
doc.splitPdf
Extract specific pages from a PDF
Use case: Extract chapters, sections, or specific pages
Parameters:
comms.emailWithAttachments
Send email with file attachments via SMTP
Use case: Send generated documents directly to recipients
Parameters:
Example: Generate Invoice PDF
{
"type": "doc.renderTemplateToPdf",
"template": "<h1>Invoice #{{invoiceNumber}}</h1>
<p>Bill to: {{customerName}}</p>
<table>
<tr><td>{{item}}</td><td>{{amount}}</td></tr>
</table>
<p><strong>Total: {{total}}</strong></p>",
"data": {
"invoiceNumber": "INV-2024-001",
"customerName": "Acme Corp",
"item": "Consulting Services",
"amount": "$5,000",
"total": "$5,000"
},
"outputFileName": "invoice-2024-001"
}Viewing Generated Files
All generated files are accessible from two locations:
- Files page - View all files generated by your organization
- Task detail view - See files generated during a specific task