DOCX Direct Filler
AI-generatedSummary
Uses AI to automatically locate and fill text fields, checkboxes, and table cells in a DOCX template with provided values.
Inputs
- mode (required) — Select 'Remplir le document' to fill values directly or 'Injecter des tags' to insert placeholder tags for template creation.
- docxProperty (required) — The name of the binary field containing the input DOCX file (default: 'data').
- fillData (required) — JSON object containing fields (text), checkboxes (booleans), and tables with cell coordinates and values. Required when mode is 'Remplir le document'.
- tagData (required) — JSON object mapping document labels to placeholder tags (e.g., 'Nom commercial': '{{NOM_COMMERCIAL}'}). Required when mode is 'Injecter des tags'.
- options.outputFilename — Optional custom name for the output DOCX file.
- options.debug — Enable detailed logging to console for troubleshooting.
Output shape
A modified DOCX file (binary data) and JSON metadata containing success status, statistics (fields/checkboxes/tables filled, duration, LLM calls), reasoning logs, and mappings.
The operation requires an AI Language Model connection. Confidence scores indicate the AI's certainty for each mapping. The operation includes retry logic for mapping failures.
Examples
Example 1: Fill a blank contract with company details and checkboxes.
Mode: 'Remplir le document', fillData includes fields for company info, checkboxes for agreement, and a table for financial data.
Example 2: Prepare a template by injecting tags for future variable data.
Mode: 'Injecter des tags', tagData maps static labels to dynamic placeholders like {{NOM_COMMERCIAL}}.
Example 3: Debug a failed fill operation to see mapping confidence and reasoning.
Mode: 'Remplir le document', options.debug enabled.