The Generate document tool allows AI Agents and Copilots to automatically generate documents. It supports generating documents using a built-in blank template or Word template files stored in document libraries. This tool is suitable for contracts, reports, notices, meeting summaries, proposal documents, approval documents, and other business scenarios.
Add the Generate document Tool
In the Tools section of an AI Agent or Copilot:
Detail
In the Detail section, you can:
It is recommended to provide a clear description so the AI can better understand the purpose of the document generation tool.
Document generation mode
The system supports two document generation modes:
Mode | Description |
Generate | Generate a document using a built-in blank template with a Rich Text content input |
Generate with templates | Generate a document using one or multiple Word template files from document libraries |
Generate Mode
When Generate mode is selected, the system uses a built-in blank template to generate the document. This mode is suitable for documents with relatively simple structures where most content is dynamically generated by AI.
This mode contains a single input parameter:
Input name | Input type | Description |
Content | Rich text | Used to populate the main body of the generated document |
Fill using
The Content field supports two fill methods:
Fill method | Description |
Custom value | Manually enter fixed content as the document body |
Dynamically fill with AI | Let AI dynamically generate the content based on the configured parameters |
When Custom value is selected, you can directly enter fixed text in the Value field. The content will be inserted into the generated document as the document body. This is suitable for fixed instructions, standard text, or predefined notifications.
When Dynamically fill with AI is selected, click Customize to configure AI content generation parameters. In the popup window, you can configure:
Display Name
Description
Clear parameter names and descriptions help the AI better understand what content should be generated.
Generate with templates Mode
When Generate with templates is selected, you can generate documents using Word template files stored in document libraries. This mode is suitable for structured business documents with fixed layouts and formatting requirements.
This mode supports:
Using a single Word template file to generate a document
Using multiple Word template files and merging them into one final output document
If multiple template files are selected, the system merges them sequentially into a single output document.
Template file
In the Template file configuration area, you need to configure the following settings:
Setting | Description |
Application | Select the application containing the template file |
Data source | Select the document library storing the template file |
Path | Select the specific Word template file |
Click the button on the right side of the Path field to select a Word template file from the selected document library.
After selecting a file and clicking OK, the system will:
Automatically parse the Word document
Identify content controls inside the document
Display the detected content controls in the Content value section for dynamic content mapping
To use multiple template files, click Add another template file.
Configure content controls
After the template is parsed, you can configure values for the content controls inside the Word template.
Click Customize in the Value column to select output variables from the current Agent or Copilot. The AI-generated content will then be dynamically mapped into the template.
For example, a Word template may contain content controls for contract numbers, customer names, contract terms, or report summaries. After configuration, the AI automatically fills the template with the mapped values.
Output Settings
In the Output Settings section, you can configure the output document format and document name.
This allows you to control the final file format and naming rules of the generated document.
Completion
In the Completion section, you can configure the behavior and outputs after the tool execution is completed.
After running
Defines the Agent behavior after the tool execution is completed.
Response behavior
Defines how the Agent responds after the tool execution.
Outputs available to the agent and other tools
Defines which outputs are available to the current Agent and other tools.
Click Customize to further configure output variable mappings.






