DocsAutomator icon

DocsAutomator

Create and manage documents with DocsAutomator

Overview

This node integrates with DocsAutomator to create and manage documents based on predefined automations. It allows users to select an automation template, fill in placeholder values, define dynamic line items (such as tables or lists), and generate either a preview or the final document. The node supports synchronous or asynchronous processing of document creation.

Common scenarios include:

  • Automatically generating invoices, contracts, or reports by filling templates with data from other workflows.
  • Creating customized documents where some parts are static placeholders and others are dynamic line items (e.g., itemized billing).
  • Previewing documents before finalizing them to verify content correctness.

Practical example:
You have an invoice automation set up in DocsAutomator with placeholders for customer name, date, and total amount, plus a line item table for purchased products. This node lets you input those values dynamically and generate the invoice document automatically within your workflow.

Properties

Name Meaning
Automation Name or ID Select the automation template to use for document creation. Choose from a dropdown list loaded from DocsAutomator or specify an ID via expression.
Placeholder Values Map values to the available placeholders defined in the selected automation. These are key-value pairs that replace placeholders in the document template.
Line Items Define one or more sets of line items (dynamic rows) for the document. Each set requires selecting a line item type (e.g., line_items_1) and providing an array of JSON objects representing each row's placeholder values.
Preview Mode Boolean flag to generate a preview version of the document instead of the final output.
Async Processing Boolean flag to process the document creation asynchronously, allowing the workflow to continue without waiting for completion.

Output

The node outputs JSON data containing the response from the DocsAutomator API after attempting to create the document. This typically includes metadata about the created document such as its ID, status, URLs, or error messages if any occurred.

If the node is configured for preview mode, the output corresponds to a preview version of the document.

No binary data output is indicated by the source code; all output is JSON structured.

Dependencies

  • Requires an API key credential for DocsAutomator to authenticate requests.
  • Makes HTTP requests to the DocsAutomator API endpoints:
    • GET /automations to load available automations.
    • GET /listPlaceholdersV2 to retrieve placeholders and line item types for the selected automation.
    • POST /createDocument to create the document with provided data.
  • The node depends on n8n's HTTP request helper and credential management.

Troubleshooting

  • Missing Automation Selection: If no automation is selected, the node throws an error "Please select an automation".
  • Invalid JSON in Line Items: If the JSON string for line items is malformed, an error "Invalid JSON format for line items in [lineItemType]" is thrown. Users should verify JSON syntax carefully.
  • API Errors: Network issues or invalid API keys will cause request failures. Check the API key credential and network connectivity.
  • No Automations or Placeholders Found: If the DocsAutomator account has no automations or placeholders, the dropdowns will show appropriate notices. Ensure automations exist and are accessible.
  • Async Processing: When enabled, document creation happens asynchronously. If downstream nodes depend on the document immediately, this may cause timing issues.

Links and References


If you need details on specific Resource or Operation beyond the default, please provide their names.

Discussion