Word Write Content
Overwrite the entire contents of a Word document with formatted HTML
Node Type
Action
Category
Microsoft Word
Icon
FileText
Overview
The Word Write Content node is an action node that overwrites the entire contents of a Microsoft Word document with formatted HTML content. This powerful integration enables you to programmatically update Word documents with rich formatting, perfect for automated document generation, content updates, and workflow-based document management.
Key Features
- • HTML to Word Conversion: Converts HTML content to properly formatted Word documents
- • Rich Formatting Support: Supports headings, lists, bold/italic text, tables, and more
- • Document Selection: Choose from your OneDrive documents with an integrated picker
- • Complete Overwrite: Replaces all existing content with new HTML content
- • Microsoft Integration: Seamless integration with Microsoft OneDrive and Word Online
- • OAuth Security: Secure authentication through Microsoft OAuth
Prerequisites
Microsoft Account Connection
Must have a connected Microsoft account with appropriate permissions
Document Requirements
Understanding of document access and HTML content requirements
Technical Requirements
Technical setup and configuration requirements
Node Configuration
Required Fields
Document ID
The ID of the Word document to write to. You can select documents from your OneDrive using the integrated file picker.
HTML Content
The HTML content to write to the document. Supports standard HTML tags including headings (h1-h6), paragraphs (p), lists (ul, ol), tables, bold (b, strong), italic (i, em), and more.
Examples & Use Cases
AI-Generated Report
Create reports from AI-generated content
Workflow Structure
{
"documentId": "{{duplicatedDocId}}",
"htmlContent": "{{aiGeneratedHTML}}"
}Use LLM to generate HTML content, duplicate a template, then write the AI content to the new document.
Dynamic Document Population
Populate Word documents with workflow data
{
"documentId": "{{contractDocId}}",
"htmlContent": "<h1>Contract Agreement</h1><p>Between: {{party1}} and {{party2}}</p><p>Date: {{currentDate}}</p><p>{{contractTerms}}</p>"
}Dynamically populate a contract document with data from your workflow using template variables.
Formatted Email to Document
Convert email content to Word documents
Workflow Structure
Read email HTML content, format it, and write to a Word document for archival purposes.
Best Practices
Do's
- • Use well-formed HTML for best conversion results
- • Test HTML formatting before large-scale deployment
- • Create backups before overwriting important documents
- • Use Word Duplicate to preserve originals
- • Include proper HTML structure (headings, paragraphs)
- • Check Success field before assuming completion
Don'ts
- • Don't use complex CSS that won't convert to Word
- • Avoid overwriting documents without backups
- • Don't forget to handle write failures
- • Avoid very large HTML content that may timeout
- • Don't use unsupported HTML tags
- • Avoid hardcoding document IDs when possible
Troubleshooting
Common Issues
Formatting Not Preserved
Symptoms: HTML doesn't convert to Word formatting correctly
Solution: Use simple, standard HTML tags. Avoid complex CSS, inline styles, or JavaScript. Test with basic HTML first, then add complexity gradually.
Document Not Found
Symptoms: Node fails with document not found error
Solution: Verify the document ID is correct and the document exists in OneDrive. Check that the user has access and write permissions.
Content Truncated
Symptoms: Only part of the HTML content appears in the document
Solution: Very large HTML content may exceed limits. Break content into smaller chunks or simplify the HTML structure.
Permission Errors
Symptoms: Node fails with insufficient permissions
Solution: Ensure the Microsoft account connection has Files.ReadWrite.All scope. Reconnect the Microsoft account if needed.