Doc Maker
The Autohive Doc Maker integration enables automated Word document creation and manipulation through conversational AI agents:
- Document creation - Build documents from scratch using markdown syntax or load existing templates with preserved formatting
- Markdown-first content - Natural content creation using standard markdown (headings, lists, tables, formatting) converted to properly styled Word elements
- Template filling - Automatically discover and replace placeholders with dynamic content while preserving document design
- Smart analysis - Scan templates to identify fillable elements and suggest optimal filling strategies
- Safety features - Context-aware replacement with multi-match protection prevents accidental content corruption
- Stateless operation - Full file streaming support for multi-step workflows in serverless environments
Install the integration
- Log in to Autohive and navigate to an agent or create a new one
- In the agent settings page navigate to “Add Integrations and Agents” section
- Click “Add integrations and agents” then locate the Doc Maker Integration card and click “Add Doc Maker”
- Doc Maker is now installed and ready to use
What Can Doc Maker Do?
The Doc Maker integration helps create professional Word documents through:
- 📄 Creating documents from scratch or templates
- ✍️ Writing content using markdown syntax
- 🎨 Filling template placeholders automatically
- 🔍 Analyzing templates to identify fillable fields
- 🛡️ Safely replacing content without corrupting existing text
- 📊 Adding tables, images, and formatted text
- 🔄 Supporting stateless multi-step workflows
Two Approaches
1. Build Documents with Markdown
Use case: Create new documents using standard markdown syntax that converts to properly formatted Word elements.
Example interaction: “Create a document with heading ‘Project Overview’, add a background section, then list three key objectives”
Best for:
- New documents from scratch
- Content-focused writing
- Quick document generation
- Flexible structure
2. Fill Template Placeholders
Use case: Use Word templates with placeholders that get automatically filled with provided data.
Example interaction:
Template contains [Company Name] → Provide “TechVenture Solutions” → Agent replaces placeholder
Best for:
- Recurring documents (contracts, reports, proposals)
- Brand consistency and compliance
- Pre-designed layouts
- High-volume document generation
Creating Documents
Markdown-Based Creation
Documents can be created using standard markdown syntax that converts to Word formatting:
Headings:
# Heading 1
## Heading 2
### Heading 3
Formatting:
**bold text**
*italic text*
`code text`
Lists:
- Bullet point 1
- Bullet point 2
1. Numbered item 1
2. Numbered item 2
Tables:
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| More | Data | Here |
Blockquotes:
> This is a quote or callout
Code blocks:
code block content
Output:
- Word document with properly styled elements
- Headings with appropriate heading styles
- Formatted text (bold, italic, code)
- Tables with grid formatting
- Bulleted and numbered lists
- Blockquotes as indented paragraphs
Template-Based Creation
Load existing Word templates to preserve formatting and design:
Template file input:
Provide: .docx file with placeholders
Output: Document ready for placeholder filling
All design elements are preserved:
- Fonts and styling
- Headers and footers
- Page layout
- Images and logos
- Custom formatting
Adding Content
Markdown Content
Append additional markdown content to existing documents:
## New Section
Content for the new section with **formatting**.
- Additional bullet points
- More information
Content is appended with proper formatting applied.
Images
Insert images from uploaded files:
Supported formats: PNG, JPG, JPEG, GIF, BMP, WebP
Size control:
Width: 5 inches
Height: 3 inches
Width and height: 6 inches × 4 inches
Images are inserted at the current document position.
Tables
Option 1: Markdown tables
| Product | Price | Quantity |
|---------|-------|----------|
| Widget | $10 | 100 |
| Gadget | $25 | 50 |
Option 2: Structured data Provide dimensions and data array for precise control:
Rows: 3
Columns: 4
Data: 2D array of cell values
Page Breaks
Insert page breaks to force content onto next page:
Action: add_page_break
Effect: Hard page break in document
Working with Templates
Template Structure
A template is a Word document with placeholders marking where content should be filled.
Concept:
- Form with fillable fields
- Mail merge pattern (one design, many versions)
- Reusable document structure
Creating Templates
Design templates in Word with placeholders where content should appear:
STATEMENT OF WORK
Client: [Company Name]
Project: [Project Title]
Date: [Date]
PROJECT SCOPE
[Project Description]
Timeline: [Start Date] to [End Date]
Investment: [Total Amount]
DELIVERABLES
[Deliverable 1]
[Deliverable 2]
[Deliverable 3]
Placeholder Formats
Doc Maker automatically detects multiple placeholder patterns:
Square brackets (recommended):
[Company Name]
[Project Title]
[Amount]
Curly braces:
{Company Name}
{{Date}}
Descriptive placeholders:
Company Name: data here
Project: enter project name
Date: date here
Empty table cells:
Table cells with no content are detected as fillable
All patterns work automatically and can be mixed within the same template.
Template Analysis
Discovering Fillable Elements
Analyze templates to identify structure and fillable elements:
Input: Template document file
Output:
Template Summary:
- Structure: 15 paragraphs, 1 table
- Fillable elements: 12 total
- Content elements hidden: 8 (for efficiency)
Fillable Paragraphs:
- p2: "[Company Name]" (pattern: square_brackets)
- p4: "[Project Title]" (pattern: square_brackets)
- p8: "Project Description: data here" (pattern: descriptive)
Fillable Table Cells:
- t0r1c0: "[Deliverable 1]" (Table 1, Row 1, Column 0)
- t0r1c1: "Amount: data" (Table 1, Row 1, Column 1)
Recommended Strategy: Use find_and_replace for square bracket placeholders, include context for safety
Provides:
- Document structure (paragraphs, tables)
- Fillable elements only (hides static content)
- Detected placeholder patterns
- Exact element positions
- Recommended filling strategy
Template Filling Methods
Method 1: Direct Replacement
Simple one-to-one placeholder replacement:
Input: "Replace [Company Name] with 'TechVenture Solutions'"
Action: Find exact placeholder, replace with value
Output: Placeholder updated in document
Works for straightforward, unambiguous placeholders.
Method 2: Data File
Provide structured data file for bulk filling:
JSON format:
{
"Company Name": "TechVenture Solutions",
"Project Title": "Digital Transformation Strategy",
"Date": "September 30, 2025",
"Total Amount": "$61,190",
"Contact Email": "emma.patterson@example.com"
}
Plain text format:
Company: TechVenture Solutions
Project: Digital Transformation Strategy
Date: September 30, 2025
Total Amount: $61,190
Contact: emma.patterson@example.com
CSV format:
Field,Value
Company Name,TechVenture Solutions
Project Title,Digital Transformation Strategy
Date,September 30 2025
Process:
- Upload data file
- Agent reads and parses data
- Matches fields to placeholders
- Fills template safely
- Returns completed document
Benefits:
- Efficient for many placeholders
- Reusable data across documents
- Easy to update and regenerate
- Reduced error rate
Method 3: Position-Based Updates
Update specific elements by position indices from template analysis:
Process:
-
Analyze template to get element IDs
p2: "[Company Name]" p5: "[Project Description]" t0r1c0: "[Budget Item]" -
Update by position:
Update p2 → "TechVenture Solutions" Update p5 → "Digital transformation..." Update t0r1c0 → "Consulting Services"
Advantages:
- Maximum safety (no accidental replacements)
- Precise control
- Works with any placeholder pattern
- Best for critical documents (contracts, legal)
Safety Features
Context-Aware Replacement
Advanced safety to prevent accidental content corruption:
Safe patterns (with context):
Find: "Date: ___" → Includes label
Find: "Project Name: placeholder text" → Includes context
Find: "Client: [Company Name]" → Exact placeholder format
Unsafe patterns (too generic):
Find: "date" → Matches "update date", "validate date", etc.
Find: "name" → Matches "filename", "username", etc.
Find: "amount" → Matches many unrelated instances
Best Practice:
- Include label text:
"Date: ___"not"date" - Include placeholder format:
"[Company Name]"not"company" - Use unique context-specific phrases
Multi-Match Protection
Prevents unintended replacements when phrase appears multiple times:
Scenario:
Document contains:
- "Amount: ___" (project amount placeholder)
- "Total Amount: ___" (total amount placeholder)
- "Payment Amount: ___" (payment placeholder)
Protection mechanism:
Search: "Amount: ___"
Detection:
1. Finds 3 matches
2. Blocks replacement (prevents unintended changes)
3. Reports match locations:
- Paragraph 5: "Project Amount: ___"
- Paragraph 8: "Total Amount: ___"
- Table 1, Row 2: "Monthly Amount: ___"
4. Suggests: Add more context (e.g., "Project Amount: ___")
Override option:
Set replace_all: true to replace all matches (use with caution)
Empty Paragraph Removal
Handles gap removal when deleting placeholder content:
Problem:
Before:
Project Overview
(Note: Delete this instruction before sending)
Background
After simple deletion:
Project Overview
← Unwanted gap
Background
Solution:
Find: "(Note: Delete this instruction before sending)"
Replace: " "
remove_paragraph: true
Result:
Project Overview
Background ← Gap eliminated
Use cases:
- Deleting instruction paragraphs
- Removing placeholder lines
- Cleaning up template artifacts
Avoid when:
- Replacing content within paragraphs
- Blank lines are intentional layout
Advanced Template Filling
Comprehensive Fill Operation
Multi-strategy template filling with safety validation:
Process:
- Pattern detection - Identifies all placeholder types (brackets, descriptive, empty cells)
- Strategy selection - Chooses optimal approach (exact match, position-based, or find/replace)
- Safety validation - Checks for ambiguous replacements
- Execution - Fills template with provided data
- Reporting - Returns detailed results
Success response:
✅ SAFETY_STATUS: OK
✅ Successfully filled 15 of 15 placeholders
Summary:
- Placeholder replacements: 12 completed
- Position updates: 2 completed
- Search/replace: 1 completed
Template Status: complete
Action Required: None - template fully filled and ready
Safety issue response:
⚠️ SAFETY_STATUS: CRITICAL_ISSUES_DETECTED
⚠️ Completed 12 of 15 operations
⚠️ Blocked 3 operations for safety
Safety Warnings:
1. "project name" is too generic and appears in 4 locations
→ Suggestion: Use "Project Name: [name]" with label context
2. "date" appears in 3 different contexts
→ Suggestion: Specify which date (e.g., "Start Date:", "End Date:")
Action Required: Refine search phrases with more context and retry
Best Practices
For Template Creators
✅ Good Practices:
-
Clear, unique placeholder names
- Good:
[Client Company Legal Name] - Bad:
[Name](ambiguous)
- Good:
-
Context labels before placeholders
- Good:
Date: [date] - Bad:
[date](no context)
- Good:
-
Consistent placeholder patterns
- Use all
[square brackets]OR all{curly braces} - Consistency aids detection
- Use all
-
Logical grouping
- Group client information together
- Group financial information together
- Facilitates data preparation
-
Testing with sample data
- Analyze template for detection accuracy
- Fill with realistic content
- Verify no unintended changes
❌ Avoid:
-
Generic placeholder names
- Bad:
[Name]→ Whose name? - Bad:
[Date]→ Which date? - Good:
[Client Contact Name],[Project Start Date]
- Bad:
-
Placeholders without context
- Bad:
[amount]alone in a line - Good:
Total Amount: [amount]
- Bad:
-
Ambiguous placeholder text
- Bad:
Project: enter name(too similar to other fields) - Good:
Project: [project name here]
- Bad:
For Template Filling
✅ Good Practices:
-
Analyze before filling
- Run template analysis first
- Understand structure and placeholders
- Choose appropriate filling strategy
-
Use data files for multiple placeholders
- Prepare JSON, CSV, or text file
- Single file fills entire template
- Easier to review and update
-
Include context in search phrases
- Search:
"Project Name: [name]" - Not:
"name"
- Search:
-
Use position-based updates for critical documents
- Safest approach
- No risk of content corruption
- Requires template analysis first
-
Review safety warnings
- Read blocked replacement reasons
- Add context to search phrases
- Don’t force
replace_allwithout verification
❌ Avoid:
-
Generic search terms
- Don’t search for “date”, “name”, “amount” alone
- Always include surrounding context
-
Ignoring safety warnings
- Multiple matches indicate potential issues
- Add context rather than forcing replacement
-
Skipping template analysis
- Analyze complex templates first
- Understand structure before filling
- Prevent surprises
Common Scenarios
Scenario 1: Weekly Status Report
Template structure:
# Weekly Status Report - Week of [Date]
## Project Progress
[Progress Summary]
## Key Metrics
- Tasks Completed: [Tasks Count]
- Completion Rate: [Completion Percentage]
- Blockers: [Blocker Count]
## Upcoming Milestones
[Upcoming Milestones]
Prepared by: [Author Name]
Data file (JSON):
{
"Date": "October 7, 2025",
"Progress Summary": "Completed phase 2 implementation...",
"Tasks Count": "23",
"Completion Percentage": "87%",
"Blocker Count": "2",
"Upcoming Milestones": "Beta release scheduled for...",
"Author Name": "Sarah Johnson"
}
Result: Consistent weekly reports generated in seconds
Scenario 2: Statement of Work
Template with placeholders:
STATEMENT OF WORK
Client: [Client Legal Name]
Project: [Project Name]
Date: [Date]
PROJECT SCOPE
[Detailed Scope Description]
TIMELINE
Start Date: [Start Date]
End Date: [End Date]
Duration: [Duration]
INVESTMENT
Professional Services: [Services Amount]
Expenses: [Expenses Amount]
Total Investment: [Total Amount]
DELIVERABLES
1. [Deliverable 1]
2. [Deliverable 2]
3. [Deliverable 3]
TERMS
Payment Terms: [Payment Terms]
Cancellation Policy: [Cancellation Policy]
CONTACTS
Client Contact: [Client Name] | [Client Email] | [Client Phone]
Project Manager: [PM Name] | [PM Email] | [PM Phone]
Data file (JSON):
{
"Client Legal Name": "TechVenture Solutions Inc.",
"Project Name": "Digital Transformation Strategy & Implementation",
"Date": "September 30, 2025",
"Detailed Scope Description": "Comprehensive analysis and implementation...",
"Start Date": "October 15, 2025",
"End Date": "March 15, 2026",
"Duration": "5 months",
"Services Amount": "$55,000",
"Expenses Amount": "$6,190",
"Total Amount": "$61,190",
"Deliverable 1": "Current State Assessment Report",
"Deliverable 2": "Technology Roadmap & Architecture",
"Deliverable 3": "Implementation & Training",
"Payment Terms": "Net 30",
"Cancellation Policy": "30 days written notice",
"Client Name": "Emma Patterson",
"Client Email": "emma.patterson@techventure.com",
"Client Phone": "+1 (555) 123-4567",
"PM Name": "Alex Rivera",
"PM Email": "alex.rivera@company.com",
"PM Phone": "+1 (555) 987-6543"
}
Benefits:
- Consistent branding and formatting
- Zero missed fields
- Professional appearance
- Rapid generation (<1 minute)
Scenario 3: Meeting Minutes
Template structure:
# Meeting Minutes - [Meeting Title]
**Date:** [Date]
**Time:** [Time]
**Location:** [Location]
**Attendees:** [Attendees]
## Agenda
[Agenda Items]
## Discussion Summary
[Discussion Summary]
## Decisions Made
[Decisions]
## Action Items
| Action | Owner | Due Date | Status |
|--------|-------|----------|--------|
| [Action 1] | [Owner 1] | [Due 1] | [Status 1] |
| [Action 2] | [Owner 2] | [Due 2] | [Status 2] |
| [Action 3] | [Owner 3] | [Due 3] | [Status 3] |
## Next Meeting
**Date:** [Next Meeting Date]
**Topics:** [Next Topics]
---
Minutes prepared by [Preparer Name] on [Prep Date]
Fill after each meeting and distribute.
Troubleshooting
Placeholder Not Found
Checks:
- ✅ Run template analysis first
- ✅ Verify exact spelling:
[Company Name]≠[CompanyName] - ✅ Check spacing:
[Date]≠[Date ](extra space) - ✅ Case sensitivity: Matching is case-insensitive by default
- ✅ Include context: Search
"Date: [date]"not just"[date]"
Solution: Template analysis shows exact placeholder text for accurate matching.
Replacement Blocked
Reason: Multiple matches found, system prevented unintended replacement
Example:
Blocked: "Amount" found in 3 locations
- Paragraph 8: "Total Amount: ___"
- Paragraph 12: "Payment Amount: ___"
- Table 1, Row 3: "Monthly Amount: ___"
Solutions:
-
Add more context (recommended)
- Instead of:
"Amount: ___" - Use:
"Total Amount: ___"or"Payment Amount: ___"
- Instead of:
-
Use position-based update
- Analyze template for position IDs
- Update specific positions: p8, p12, t0r3c1
-
Replace all (use carefully)
- Set
replace_all: true - Only if all instances should have same value
- Set
Accidental Content Change
Cause: Search phrase too generic
Example:
Searched: "name"
Intended: Replace "[Name]" placeholder
Actual: Changed "filename", "company name", "username", etc.
Prevention:
-
Include context
- Good:
"Client Name: [name]" - Bad:
"name"
- Good:
-
Use exact placeholder format
- Good:
"[Client Name]" - Bad:
"Client Name"
- Good:
-
Analyze template first
- See exact match candidates
- Test on copy for critical documents
Recovery:
- Reload original template
- Use position-based updates for control
Incomplete Template Filling
Cause: Some placeholders not matched
Checks:
-
Run template analysis
- See all placeholders
- Compare with data file
-
Verify data keys
- JSON keys must match placeholder names
[Company Name]requires"Company Name": "value"
-
Check pattern mixing
- Multiple placeholder patterns may need different strategies
[Bracket]vs{Brace}vs"data here"
Solution: Fill remaining placeholders individually or use position-based updates.
Quick Reference
Markdown Syntax
| Element | Syntax | Word Output |
|---|---|---|
| Heading 1 | # Text |
Heading 1 style |
| Heading 2 | ## Text |
Heading 2 style |
| Heading 3 | ### Text |
Heading 3 style |
| Bold | **text** |
Bold formatting |
| Italic | *text* |
Italic formatting |
| Code | `text` |
Code style |
| Bullet list | - item |
Bulleted list |
| Numbered list | 1. item |
Numbered list |
| Blockquote | > text |
Indented paragraph |
| Table | | col | col | |
Grid table |
Placeholder Patterns
Auto-detected placeholder formats:
[Placeholder] → Square brackets
{Placeholder} → Curly braces
{{Placeholder}} → Double curly braces
Label: data here → Descriptive placeholders
Empty table cells → Cells with no content
All patterns work automatically and can be mixed.
Template Workflow
Standard process:
-
Analyze template
- Identify structure and placeholders
- Get element positions
-
Prepare data
- Create data file (JSON, CSV, or text)
- Match field names to placeholders
-
Fill template
- Provide data file or individual values
- Agent processes with safety checks
-
Review results
- Check safety warnings
- Verify all placeholders filled
-
Download document
- Get completed Word file
Safety Checklist
Pre-filling:
- Analyzed template structure
- Prepared data with matching field names
- Included context in search phrases
- Tested on copy (for critical documents)
- Ready to review safety warnings
Safe patterns:
- ✅
"Client Name: [name]"→ specific with context - ✅
"[Company Name]"→ exact placeholder format - ✅ Position-based:
p5,t0r2c1→ precise location
Unsafe patterns:
- ❌
"name"→ too generic - ❌
"date"→ too common - ❌
"amount"→ ambiguous
Approach Selection
Use Markdown When:
- Creating new documents
- Content is primary focus
- Flexible structure needed
- No template exists
Use Templates When:
- Recurring documents (contracts, reports)
- Brand consistency required
- Pre-designed layout needed
- Multiple users need same format
Use Position-Based Filling When:
- Template is complex
- Document is critical (legal, financial)
- Maximum safety required
- Mixed placeholder patterns
Real-World Example: Employee Onboarding
Step 1: Design Template
# Employee Onboarding - [Employee Name]
**Position:** [Job Title]
**Department:** [Department Name]
**Start Date:** [Start Date]
**Manager:** [Manager Name]
## Welcome Message
Dear [Employee Name],
Welcome to [Company Name]! We're excited to have you join our [Department Name] team as our new [Job Title].
## First Day Details
**Date:** [Start Date]
**Time:** [Start Time]
**Location:** [Office Location]
**Parking:** [Parking Instructions]
## Your Onboarding Buddy
[Buddy Name] will be your onboarding buddy.
**Contact:** [Buddy Email] | [Buddy Phone]
## First Week Schedule
| Day | Activity | Location | Time |
|-----|----------|----------|------|
| Monday | [Mon Activity] | [Mon Location] | [Mon Time] |
| Tuesday | [Tue Activity] | [Tue Location] | [Tue Time] |
| Wednesday | [Wed Activity] | [Wed Location] | [Wed Time] |
## Required Documents
Please bring:
- [Document 1]
- [Document 2]
- [Document 3]
## IT Setup
**Equipment:** [Equipment List]
**Accounts:** [Accounts List]
**Software:** [Software List]
## Questions?
Contact HR: [HR Contact Name] | [HR Email] | [HR Phone]
---
Document prepared by [Preparer Name] on [Prep Date]
Step 2: Save Template
Save as employee_onboarding_template.docx
Step 3: Prepare Data File
JSON format:
{
"Employee Name": "Jordan Chen",
"Job Title": "Senior Software Engineer",
"Department Name": "Engineering",
"Start Date": "October 15, 2025",
"Manager Name": "Sarah Johnson",
"Company Name": "TechVenture Solutions",
"Start Time": "9:00 AM",
"Office Location": "Building A, 3rd Floor",
"Parking Instructions": "Use visitor parking, collect permit at reception",
"Buddy Name": "Alex Rivera",
"Buddy Email": "alex.rivera@techventure.com",
"Buddy Phone": "+1 (555) 123-4567",
"Mon Activity": "Orientation & Welcome Session",
"Mon Location": "Conference Room B",
"Mon Time": "9:00 AM - 12:00 PM",
"Tue Activity": "Department Introduction & Setup",
"Tue Location": "Engineering Floor",
"Tue Time": "9:00 AM - 5:00 PM",
"Wed Activity": "Training Sessions",
"Wed Location": "Training Room 2",
"Wed Time": "10:00 AM - 4:00 PM",
"Document 1": "Government-issued ID",
"Document 2": "Signed offer letter",
"Document 3": "Banking information for direct deposit",
"Equipment List": "MacBook Pro, 27\" monitor, keyboard, mouse, headset",
"Accounts List": "Email, Slack, GitHub, Jira, Confluence",
"Software List": "IDE, development tools (list provided separately)",
"HR Contact Name": "Emily Rodriguez",
"HR Email": "hr@techventure.com",
"HR Phone": "+1 (555) 999-8888",
"Preparer Name": "Emily Rodriguez",
"Prep Date": "October 1, 2025"
}
Step 4: Fill Template
Provide template and data file to agent for filling.
Step 5: Results
Output: Complete onboarding document Time: <1 minute Accuracy: All 28 fields filled correctly
Benefits:
- 95% time reduction (60 min → 2 min)
- Zero missed fields
- Consistent format for all new hires
- Easy template updates benefit all future documents
Summary
Doc Maker capabilities:
- ✅ Markdown-first - Natural content creation with proper Word formatting
- ✅ Template reuse - Design once, generate hundreds of documents
- ✅ Smart analysis - Automatic placeholder detection and structure understanding
- ✅ Safe filling - Context-aware replacement with multi-match protection
- ✅ Flexible strategies - Multiple approaches for different document types
- ✅ Stateless - Full file streaming for multi-step serverless workflows
Focus on content and data, let the system handle formatting and safety.
Agent Interaction Examples
Create document: “Create a document with heading ‘Project Overview’, add three sections for background, objectives, and timeline”
Analyze template: “Analyze this template and show me what fields need to be filled”
Fill template: “Fill this proposal template using the client data from the attached file”
Specific field: “Update the company name field to TechVenture Solutions”
Check remaining: “What fields in the template still need values?”
Restart: “Reset and reload the original template”
The agent understands natural language instructions while handling all technical implementation details.