DocEngine

Examples

Domain use cases

Real patterns: interactive editor first, then automation (n8n / API link) when systems need HTML or PDF without opening the UI.

1. Clinical note (ophthalmology-style)

Goal: structured visit note with tree-coded complaints, life history, and a findings table — preview HTML, export PDF.

  • Fields: Tree, Text, Table, Date, List
  • Flow: Design template → fill trees/tables → Document preview → PDF
Ophthalmology Examination editor with ICD-10 picker: searchable diagnosis list, multi-select chips, and clinical fields behind the modal
Fill mode uses typed pickers (here ICD-10) and editable table rows. Design once; the same template JSON is reused in n8n below.

2. Same clinical template → n8n PDF

Goal: Salesforce or a custom app posts filled sections JSON; n8n returns document.pdf.

n8n DocEngine node: Input sections JSON, Parameters with template stored in node and Values JSON Path, Output document.pdf
Input (left) → DocEngine parameters (center: template stored in node, Values expression) → binary PDF (right).

Values JSON Path

{{
  {
    "Complaints": $json.sections.Anamnesis.Complaints,
    "Anamnesis": $json.sections.Anamnesis['Life history']
  }
}}

Input shape

{
  "sections": {
    "Anamnesis": {
      "Complaints": ["Vision disturbance decreased acuity", "Tearing", "Photophobia"],
      "Life history": ["Chronic conditions hypertension", "Eye surgery"]
    },
    "Items": {
      "Table": [
        { "column_1": "111", "column_2": "22" }
      ]
    }
  }
}

Package: n8n-nodes-docengine · Host details: API & hosts

3. Invoice / order document

Goal: customer header + line-item table + computed total; optional Mapping from ERP JSON.

  • Fields: Text, Number, Date, Table, Choice, Computed (total)
  • Automation: Mapping $payload.Lines… or n8n values path
Invoice / order editor with customer header, product line table, computed total, and Address field modal
Use a Computed field for totals so preview and PDF stay consistent with line edits.

4. Salesforce invoice

Goal: fill an invoice in Lightning (addresses, line items, totals); then Finish → PDF through n8n or in-org PDF.

  • Fields: Text, Table, Number, Computed (total)
  • Host: Lightning modal / iframe — Cancel, Save Draft, Finish
Salesforce Lightning Invoice modal: DocEngine editor with payment and shipping addresses, product line table, and Finish
Same invoice template as above, hosted in Salesforce. Remote lists (Accounts, picklists) use Lists & queries (sourceCollection such as Account). Full package specification: Salesforce implementation.

5. Authorised API link (web client)

Goal: external system POSTs a source payload; this site maps fields and returns HTML/PDF. Configure Mapping in Design, then dashboard API link.

Authorised API flow: JSON payload with field mapping, DocEngine step configured for PDF output, and resulting invoice PDF
External payload + Mapping → HTML/PDF. Not for Salesforce PDF — use n8n for that. API details: API & hosts.