AI Fill (Step 2)
AI-generatedSummary
Fill a DOCX document by applying an AI-generated mapping to insert company data at target locations.
Inputs
- documentToFill (required) — Binary property containing the target DOCX document to fill.
- aiMapping (required) — JSON mapping returned by the LLM (from AI Extract → LLM), defining where and how to insert data.
- companyDataAI (required) — Company data keyed by data keys (e.g., NOM_COMMERCIAL, SIRET, ADRESSE) to insert into the document.
- outputProperty — Name of the binary property where the filled DOCX will be stored.
Output shape
New binary property at outputProperty containing the filled DOCX, with json metadata { success, operation, fieldsFilledCount, mappingsApplied, companyName }.
The aiMapping JSON is expected to follow the structure output by AI Extract → LLM, containing mappings with dataKey, targetText, location, insertionMethod, and confidence. Company data is normalized via the node's internal normalizeCompanyData function before mapping application.
Examples
Example 1: Fill a DC1 template with company data using an LLM-generated mapping from a previous AI Extract step.
Connect a DOCX binary to documentToFill, provide the aiMapping JSON from a prior AI Extract node, supply companyDataAI as JSON, and set outputProperty to 'filledDocument'. The node will produce a filled DOCX binary and success metadata.