Skip to main content

Template Author Guide

Create smart, dynamic templates that pull data directly from LegalServer and automate client interactions.

Key Benefit: No Mapping Required Unlike standard LegalServer templates, you do not need to manually map each field in your template to a corresponding LegalServer field. Workflow Docs automatically handles the data binding, saving you tedious setup time.

1. Example Template

Below is a copyable example of what a standard .docx template looks like when using core Workflow Docs functionality.

RETAINER AGREEMENT

Case Number: {{ legalserver_case.id }}
Date: {{ today() }}

I, {{ clients[0] }}, hereby retain {{ organization_name | ask(question="Organization name?", default="Lemma Legal") }} to represent me in the matter of {{ matter_description | ask(question="Brief description of the matter", datatype="area") }}.

COMMUNICATION PREFERENCE:
{{ preferred_contact | ask(question="How should we contact you?", options=["Phone", "Email", "SMS"]) }}

CLIENT SIGNATURE:
{{ clients[0].signature | request(question="Please sign the retainer agreement") }}

ADVOCATE SIGNATURE:
{{ advocate.signature | request }}

2. In-line Document Requests

You can prompt a client to upload a document directly from your template. This is a powerful supplement to the standard "Request Documents" workflow, as it allows you to link specific files to the text of your document.

Syntax

Use the submitted_document_uploads attribute combined with the | request filter:

Please see the attached identification:
{{ clients[0].submitted_document_uploads[0] | request(question="Please upload a photo of your ID") }}
  • In the Interview: The client will see a file upload field with your custom question.
  • In the Template: Once uploaded, the document's title (or a link to the file) will be inserted exactly where you placed the variable.

3. PDF Templates

Workflow Docs can fill existing PDF form fields, ask the advocate for missing values, and route fields to clients or other requestees. PDF templates use a companion .yml file instead of Jinja expressions inside the document.

See PDF Templates and Sidecar YAML for setup instructions, a complete sidecar reference, request behavior, conditional fields, output formatting, and troubleshooting.

4. Managing Your Templates

You can create and manage templates using our web-based tools:

Note: If your organization has a dedicated Workflow Docs server, replace app.workflowdocs.com with your specific server URL.

5. Permissions & Access

A client of WorkflowDocs who wants to be able to manage templates for their organization needs to be given the Docassemble privilege manage_templates, and this needs to be done by asking the WorkflowDocs team.

How to request permissions:

If you cannot access the Template Manager, you can email info@lemmalegal.com with the following details:

  1. The email address you use to log in to LegalServer.
  2. The server name or URL that runs your Workflow Docs instance (e.g., app.workflowdocs.com or yourorg.workflowdocs.com).
  3. Your organization name.