š Word Export Block#
š Overview#
The Word Export Block allows you to automatically generate personalized Word documents using your own templates and AI-generated content. This functionality transforms content created in your application into professional .docx documents, ready to be used.š Migration from Word V1 (Legacy)#
ā ļø Important: Word Block Evolution#
ā ļø Legacy Notice: The old version of the Word Block (Word V1 - Legacy) is no longer recommended for new projects.
š Legacy Version Behavior#
This historical version worked on a simple principle: it was sufficient for the Word V1 block to be parent to all content to export and it took all content as one piece to place it in the generated document.š Fundamental Difference with New Version#
š§ New Requirements#
The new Word Export Block introduces a variable system that requires at minimum one variable (in {{~~content}}
format) in your template, even to reproduce the simple behavior of the old version.ā” Enhanced Capabilities#
This evolution brings considerably increased power:Header and footer feeding
Variables positioned in tables
Specifically formatted elements
Content distributed between cover pages and appendices
Precise control of document structure
š Migration Path: If you used Word V1 to simply export all your content at once, now create a template with a {{~~main_content}}
variable and use the automatic mode of the new block.
š Word Template Preparation#
šØ Template Creation#
1
š Create Template
Before configuring your Word Export Block, you must prepare a Word template (.docx) that will serve as the base for your documents.
2
šØ Design Elements
This template can contain:
Your graphic charter and formatting
Custom headers and footers
Tables, images and structural elements
Variables positioned at desired locations
š§ Variable Syntax#
For Thinkeo to automatically feed your template, you must use specific syntax to mark dynamic content locations:šÆ Standard
Most versatile format, ideal for paragraphs and long textsāļø Inline
Use when encountering formatting issues with standard format, allows better Word style preservationš Alternative
Use when encountering formatting issues with tablesā
Core Concept: The fundamental idea is that Thinkeo generates content via AI, then automatically feeds the different variables positioned in your Word template.
š Variable Naming Rules#
ā
Valid Requirements#
No spaces: Use underscores to separate words (ex: title_introduction
)
No hyphens: Avoid the -
character in variable names
No numbers at start: Variables cannot start with a digit (ex: section_1
is correct, 1_section
is not)
Not only numbers: A variable cannot consist only of digits
š Examples#
{{~~main title}}
(contains space)
{{~~main-title}}
(contains hyphen)
{{~~2_section}}
(starts with number)
š¼ļø Image Management#
Word and PowerPoint blocks now support dynamic image integration with several syntaxes:1
šø Image Variables
Use the special format for image variables in your template:
2
š Extract Images from Blocks
To extract an image from a paragraph block containing a single image, use this syntax in the Word block mapping (not in the template):
{{ blocks["block_id"] | extract_first_link_html }}
Important: Replace block_id
with the actual block UUID from Thinkeo. This goes in the variable mapping configuration of the Word block, not in the template itself.3
š Template Image Replacement
Add the image variable as alt-text of an existing image in your template
The exported image will automatically take the dimension of the template reference image
This approach allows dynamic modification of logos, product images, or covers according to user selections
āļø Word Export Block Configuration#
šļø Block Creation#
1
ā Add Block
In your application, add a new Word Export Block
2
š¤ Import Template
Upload your Word file (.docx) containing the variables
3
š Automatic Detection
The system automatically analyzes your template and detects all present variables
4
ā
Validation
Verify that all your variables are correctly recognized in the interface
šļø Operating Modes#
The Word Export Block offers two distinct approaches according to the desired level of control.
š¤ Automatic Mode: AI Generation Enabled#
š§ Operating Principle#
In this mode, AI automatically manages content distribution in the different variables of your template. This approach is ideal for quick and simple implementation.āļø Configuration#
1
ā
Enable Option
Check "AI Generation" during block configuration
2
š§© Child Blocks
Add your content blocks (texts, web searches, etc.) as nested blocks
3
š¬ Additional Prompt
Use the additional prompt field to guide AI in content distribution
4
šÆ Explicit Variables
The more descriptive your variable names (ex: {{~~introduction}}
, {{~~conclusion}}
), the more precise AI will be in its placement
ā” Advantages#
š Quick Setup
Fast and intuitive configurationš Adaptive AI
AI automatically adapts to available contentšÆ Efficiency
Very effective with well-named variables and detailed additional prompt (if necessary)
šÆ Manual Mode: Precise Mapping Control#
š§ Operating Principle#
This mode gives you total control over the correspondence between each content block and each template variable. It requires more configuration but offers maximum precision.šļø Recommended Architecture#
For optimal management, structure your blocks according to this hierarchy:1
š Main Content Blocks
Generate global content for the document via AI blocks
2
š Extraction Blocks
Create additional AI blocks to isolate specific elements (introduction, development, conclusion, etc.)
3
š Precise Mapping
Associate each template variable with a specific extraction block
š Structure Example#
AI Block "Executive Summary" (extracts the summary)
āāā AI Block "Report Content" (shared block - generates all document content)
AI Block "Introduction" (extracts the introduction)
āāā AI Block "Report Content" (shared block - same block as above)
AI Block "Main Analysis" (extracts the document body)
āāā AI Block "Report Content" (shared block - same block as above)
AI Block "Recommendations" (extracts the recommendations)
āāā AI Block "Report Content" (shared block - same block as above)
š§ Mapping Configuration#
š Retrieving Block and Attribute IDs#
Before configuring your Word Export Block with manual mapping or image extraction, you'll need to retrieve the specific IDs of your attributes and blocks.š Attribute IDs#
Attributes allow you to send your files and data to Thinkeo for use in the App.1
š Access Attributes Page
You can find their IDs in the Attributes page, then by clicking on one of the attributes.
2
š View Attribute Details
3
š Copy ID
You can click on the icon next to the ID to copy it with one click.
š§© Block IDs#
1
šÆ Select Block
In the Studio, by selecting a block from the hierarchy or central panel, click on the icon corresponding to the block parameters.
2
š Access Block ID
From there you will have access to the block ID, which can also be copied/pasted with one click.
3
š Alternative Method
To do this, click on the "..." of a block from the tree view, select "open in new tab" then retrieve the ID.
š Usage Context: These IDs are essential when using manual mapping mode or when configuring image extraction from specific blocks. Always copy the complete UUID without modification.
1
ā Disable AI
Uncheck the "AI Generation" option
2
š ID Attribution
For each detected variable, select the corresponding block or attribute using the IDs you retrieved
3
ā
Mapping Validation
Verify that each variable has its assigned source block
š Results and Best Practices#
š Rendering Quality#
Both modes generate quality documents:š¤ Automatic Mode#
Effective with explicit variables and a well-written additional promptšÆ Manual Mode#
Offers granular control over placement of each content elementš” Recommendations#
šļø Block Structure
Essential Point: The Word Export Block must be parent to all your content blocks to have them available and be able to export themIf you want manual mapping, break down your block structure into as many sub-parts as necessary so each variable has a corresponding block or attribute
šÆ Mode Choice
Automatic Mode: Ideal with well-named variables and well-adjusted additional promptManual Mode: Favor this approach when you want to precisely target what specific content should be placed at what location in the documentā” Optimization
Use very explicit variable names in your templates (ex: project_introduction
, financial_analysis
)
Write a detailed additional prompt to guide AI in distribution (automatic mode)
Document your mapping for easier maintenance (manual mode)
šØ Template Optimization
Favor the {{~~variable}}
format except for formatting problems
Test both tilde formats according to your style needs
Maintain consistency in your variable names
Exploit Word capabilities: headers, footers, tables, custom styles
š Table Styles: The Word block automatically uses the default table style if it exists in your template. In the absence of a default style, the system applies the "Thinkeo Table" style for all generated tables. The triple tilde format {{~~~variable}}
remains recommended to resolve formatting issues in tables.
š Conclusion#
The Thinkeo Word Export Block offers you a powerful solution to automate the creation of professional Word documents. This new version far exceeds Word V1 capabilities thanks to its variable system that allows fine control of document structure.Whether you choose automatic mode for its ease of use or manual mode for precise control, the essential lies in preparing your template with explicit variables and understanding how to retrieve the necessary IDs for precise mapping.The key to success is found in the hierarchical organization of your blocks: the Word Export Block as parent and your content blocks as children. This structure, combined with descriptive variable names and, depending on the chosen mode, a detailed additional prompt or precise mapping, guarantees quality results.Don't hesitate to experiment with both modes according to your projects: automatic mode will save you time on standardized structures, while manual mode will give you total control over documents with specific needs.