Package Information
Released: 1 mo ago
Downloads: 4 weeklyΒ /Β 85 monthly
Latest Version: 0.1.1
Available Nodes
Documentation generatingβ¦
Documentation
@trg-admin/n8n-nodes-office-tools
An n8n community node for the Office Tools REST API β empowering automated document generation, AI-powered document creation, template rendering, revisions & tracked changes, full-text search, and asynchronous PDF export jobs.
π Table of Contents
- Features
- Installation
- Credentials & Setup
- Resources & Operations
- Workflow Examples
- Development & Building
- Publishing
- License
β¨ Features
- Document Processing & Conversion:
- Convert HTML into clean DOCX documents.
- Upload existing binary documents (DOCX, etc.) with metadata.
- Download documents directly into n8n binary streams.
- Replace document body content from raw HTML while preserving structure.
- AI-Powered Document Generation:
- Generate structured Word documents from JSON data payloads and plain-English prompts.
- Template Rendering:
- Dynamic template dropdown loader (
loadOptions). - Extract template variable schemas and sample payloads.
- Live render preview across formats (
PDF,DOCX,XLSX,PPTX,ODT,ODS,ODP). - Synchronous and asynchronous document rendering with custom actor & metadata tagging.
- Dynamic template dropdown loader (
- Tracked Changes & Revisions:
- Inspect revision histories and tracked changes.
- Programmatically accept or reject revisions.
- Text & Structure Manipulation:
- Extract text with character offset and length limits.
- Full-text search inside document bodies.
- Batch apply text edit actions (
insert,replace,delete).
- Async Job & Artifact Handling:
- Queue PDF export jobs and poll job status.
- Download finished artifacts (PDF) directly into workflow binaries.
π¦ Installation
In n8n Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance.
- Select Install a community node.
- Enter
@trg-admin/n8n-nodes-office-tools. - Accept the risk warning and click Install.
Manual / Docker Installation
Install the package inside your custom n8n Docker image or local node module directory:
npm install @trg-admin/n8n-nodes-office-tools
π Credentials & Setup
- In n8n, navigate to Credentials > New Credential.
- Search for and select Office Tools API (
officeToolsApi). - Fill in the required fields:
- API Base URL: The base URL of your Office Tools server (e.g.
http://localhost:18081orhttps://office-tools.internal.yourdomain.com). - API Token: Bearer authentication token used to authorize requests.
- Ignore SSL Issues: Toggle on if using self-signed certificates or internal staging environments.
- API Base URL: The base URL of your Office Tools server (e.g.
- Save and test the connection.
π Resources & Operations
1. Document
Manage documents, convert formats, inspect text, and apply tracked changes.
| Operation | Description | Inputs / Parameters |
|---|---|---|
| List | List all accessible documents in the system | β |
| Get | Fetch document metadata | Document ID |
| Download | Download document binary (DOCX) | Document ID (Outputs binary property data) |
| Get Text | Extract plaintext from document | Document ID, Offset, Max Characters |
| Search | Search for substring occurrences in document | Document ID, Query, Max Results |
| Upload | Upload binary file as a new document | Binary Property, Department ID (optional), Metadata JSON (optional) |
| Create From HTML | Convert HTML content to a new DOCX document | HTML, Filename (optional), Metadata JSON (optional) |
| Generate | Generate document using AI instructions and data | Data (JSON), Instructions, Filename |
| Apply Actions | Apply batch text modifications (insert, replace, delete) |
Document ID, Actions (JSON), Actor (JSON) (optional) |
| Replace HTML | Replace document body content with HTML | Document ID, HTML |
| List Revisions | Retrieve revision history & tracked changes | Document ID |
| Revisions Decide | Accept or reject tracked changes | Document ID, Decision (accept / reject) |
| Export to PDF | Queue an asynchronous PDF conversion job | Document ID (Returns job metadata) |
Example: Apply Actions JSON
[
{
"type": "replace",
"search": "{{CUSTOMER_NAME}}",
"value": "Acme Corp",
"position": "after"
},
{
"type": "insert",
"search": "Signature:",
"value": " Signed electronically on 2026-09-15",
"position": "after"
}
]
2. Template
Work with predefined templates, extract variables, preview outputs, and render final documents.
| Operation | Description | Inputs / Parameters |
|---|---|---|
| Get | Fetch template metadata | Template (dropdown) |
| Download | Download raw template binary file | Template (dropdown) |
| Get Variables | Extract dynamic variables defined in the template | Template (dropdown) |
| Sample Payload | Generate an example JSON data payload for the template | Template (dropdown) |
| Preview | Render quick visual binary preview | Template, Data (JSON), Output Format (PDF, DOCX, XLSX, PPTX, ODT, ODS, ODP) |
| Render to Document | Render template into a new document | Template, Data (JSON), Output Format (DOCX, PDF, XLSX, PPTX), Filename, Metadata (JSON), Actor (JSON), Async (boolean) |
3. Job
Track and retrieve asynchronous export/rendering jobs.
| Operation | Description | Inputs / Parameters |
|---|---|---|
| Get Status | Check execution state and progress of an async job | Job ID |
| Download Artifact | Download completed job artifact (PDF) binary | Job ID (Outputs binary property data) |
π‘ Workflow Examples
Example 1: Generate a Document from HTML & Export to PDF
- Webhook / Trigger: Receive customer contract details.
- Office Tools (
Document>Create From HTML): Convert formatted HTML template with customer variables into a DOCX document. - Office Tools (
Document>Export to PDF): Trigger PDF generation job. - Office Tools (
Job>Download Artifact): Fetch generated PDF artifact. - Email / Slack Node: Send final PDF to customer.
Example 2: Populate a Template & Send Preview
- Office Tools (
Template>Preview): Select template from dynamic dropdown and supply data JSON payload (outputFormat: pdf). - Google Drive / WorkDrive / S3 Node: Upload binary output directly.
π οΈ Development & Building
# Navigate to package directory
cd office-tools
# Typecheck TypeScript definitions
npm run typecheck
# Build and package assets
npm run build
π¦ Publishing
To publish this package to the npm registry:
cd office-tools && npm publish --access public