Use Workflows for Document Generations
Document Generation in Workflows Canvas
C3 AI Workflows now support document authoring directly within the workflow canvas, enabling automated document creation as part of your business processes.
Overview
You can now create documents as workflow outputs using structured data processing and AI-powered content generation. This allows you to automate report creation, documentation generation, and formatted output production within your workflow pipelines.
Document Generation Workflow
Basic Pattern
A typical document generation workflow follows this structure:
graph LR
Start --> collect_json_input --> parse_json --> extract_fields --> generate_report
Key Benefits
- Structured Input: Process JSON data to maintain data integrity
- Automated Generation: Create documents without manual intervention
- Consistent Formatting: Use templates for standardized outputs
- Integrated Pipeline: Document creation as part of larger workflows
Building a Document Workflow
Step 1: Collect Data
Use the get_user_input_node_template to collect JSON input:
- Prompt users for structured data (calculations, analysis results, etc.)
- Validate JSON format to ensure clean data processing
Step 2: Process Data
Use modify_global_state_node_template nodes to:
- Parse JSON into Python dictionaries
- Extract specific fields and organize data
- Transform data for document generation
Step 3: Generate Document
Use the document_generation_node_template to:
- Create formatted reports from processed data
- Apply consistent styling and structure
- Output documents in various formats (PDF, HTML, etc.)
Example: Engineering Report Workflow
For engineering calculations:
- collect_json_input: User provides calculation results in JSON format
- parse_json: Convert to Python dictionary for processing
- extract_fields: Organize calculation data, metadata, and results
- generate_report: Create formatted engineering documentation
Why Use Workflows for Documents
- Automation: Documents generated automatically from data inputs
- Consistency: Standardized formatting across all generated documents
- Integration: Document creation integrated with data processing workflows
- Scalability: Generate multiple documents from the same workflow pattern
See Also
- Workflow Overview - General workflow concepts
- Node Templates - Available workflow nodes