Skip to main content

Docx from Template Node

The Docx from Template node generates DOCX (Microsoft Word) documents from a template file by replacing variables with dynamic data. This versatile node enables automated document generation for contracts, letters, reports, proposals, and other editable documents that require personalized content while maintaining the original Word format.

Docx from Template node


Basic Usage

Use the Start Node, Docx from Template, and Display Text nodes to create a document generation workflow.


Inputs

The Docx from Template node accepts the following inputs:

  • Config JSON: A JSON object containing key-value pairs that map to variables in your DOCX template. These values will replace corresponding placeholders in the template.

Outputs

  • Docx File URL: The URL of the generated DOCX file that can be downloaded, displayed, or used in subsequent nodes.
  • File Output: The file object output that can be connected to other nodes for further processing or storage.

Configuration

Docx Template

Upload a DOCX template file that contains variables to be replaced:

  1. Click the upload area or drag and drop your DOCX template file.
  2. The file should contain placeholders/variables that match the keys in your config JSON.
  3. Template variables are typically formatted as {{variableName}} or similar syntax depending on your template structure.
  4. You can remove the uploaded file using the "Remove File" button if you need to upload a different template.

File size limit: Check your system configuration for maximum file size limits.

Display Options

  • Show Download Button: When enabled, users will see a download button to save the generated DOCX file locally. This allows users to download the editable Word document for further modifications.

Example Workflows

Contract Generation

Scenario: Generate personalized employment contracts by filling a DOCX template with employee information.

Docx from Template Example

Steps to Create the Flow:

  1. Start with the Start Node.

  2. Add and connect a Docx from Template node:

    i. Upload your DOCX template (e.g., contract template with placeholders like {{employeeName}}, {{position}}, {{startDate}}, {{salary}})

    ii. Connect a JSON data source to Config JSON input

    • Example config JSON:
    {
    "employeeName": "Sarah Johnson",
    "position": "Senior Software Engineer",
    "startDate": "January 15, 2026",
    "salary": "$120,000",
    "department": "Engineering",
    "manager": "Michael Chen",
    "workLocation": "San Francisco, CA"
    }

    iii. Enable display options:

    • ✓ Show Download Button
  3. Connect Docx File URL output to Display Text node to show the file URL and provide download access.

Preview:

The system will:

  1. Take your DOCX template with variables
  2. Replace all {{variableName}} placeholders with values from the config JSON
  3. Generate a DOCX file with the personalized content
  4. Provide a download button for users to save the editable document

Result: Users receive a professionally formatted DOCX contract with their personalized information that can be further edited in Microsoft Word or compatible applications.


  • Form Node: Collect user input to populate the config JSON
  • Display Text: Display the generated DOCX URL or download link
  • Document Download: Enable users to download the generated DOCX file
  • Google Drive: Save generated DOCX files to cloud storage
  • PDF from Template: Similar functionality but generates PDF files instead of DOCX
  • CSV Builder: Generate multiple DOCX files from CSV data in batch operations
  • Data Dump: Store document generation data for auditing