Skip to main content
After you attach document templates to a workflow, you can configure how Gavel handles the generated output. These settings control the file format of the finished documents, who sees them and when, which documents generate under what conditions, and where they are delivered. You manage all of these options from the Document Templates tab of your workflow.

Output file type

When your template is a .docx file, Gavel can generate the output as a Word file, a PDF, or both. By default, both formats are produced.To change the file type:
  1. Open your workflow and go to Document Templates.
  2. Click on the document’s name.
  3. Select your preferred output: Word only, PDF only, or Both.
This setting determines which file types appear on the final screen of your workflow when the documents are displayed to the user. File types included in automated emails are configured separately.All PDF template files always generate PDF output — this option only applies to Word-based templates.

Displaying documents to users

By default, Gavel shows all generated documents to the end user at the end of the questionnaire. You can change this behaviour in several ways.
If you do not want the user who filled out the questionnaire to see the generated documents — for example, if you are generating documents for internal review only — you can suppress the document display screen.
  1. Open your workflow and go to Document Templates.
  2. Check Do not display finalized documents to workflow taker.
  3. Optionally check Send finalized documents to email address and enter the email address where the documents should go.
  4. Click Save.
You can still view completed documents in the Data Manager if you are on the Standard, Pro, or Scale tier.
You can use logic to control which documents generate and display based on questionnaire answers. This lets you attach multiple possible output documents to one workflow and generate only the ones relevant to each user’s situation.To set up conditional document generation:
  1. Open your workflow and go to Document Templates.
  2. Make sure all possible output documents are attached to the workflow. You can attach the same document to multiple workflows.
  3. Select Logic on the left side of the Document Templates tab.
  4. Set default documents that generate every time, and add rules that determine when each additional document generates.
For example, you might have four documents that always generate, plus a Living Trust document that only generates when the user selects “Revocable Living Trust” in a multi-select question. If no logic is set, all attached documents generate.

Sharing documents via email

You can configure Gavel to automatically send the finished documents to an email address each time the workflow is run. You can specify a fixed email address or use the value stored in an email variable from the questionnaire (so the documents go directly to the person who filled out the form).A PDF copy of each document is included in the email by default. If your documents were generated from Word templates, you can also choose to include an editable .docx version.Automated emails are sent from no-reply@mail.docautomation.org with the sender name Gavel by default. Scale customers can configure a custom sender using a Mailgun account — contact help@gavel.io with your Mailgun email, API key, and domain.You can customise the subject line and body of automated emails from the workflow settings.
If documents are displayed to the end user at the end of the workflow, the generated documents page includes a section where the user can email themselves a copy. If the user is logged into a Gavel account, their email address populates the field automatically.

Generate Multiple (per repeating item)

If your workflow has a repeating item and you want to produce a separate copy of a document for each instance of that item — for example, one document per party or one document per asset — you must mark the template as Generate Multiple in the Document Templates tab.
If a template uses the Generate Multiple syntax in the document body but is not marked as Generate Multiple in the Output Documents tab, the workflow will produce an error. Always make sure the setting and the template syntax are in sync.
To enable Generate Multiple:
  1. Open your workflow and go to Document Templates.
  2. Click on the document’s name.
  3. Enable the Generate Multiple option.

Quick reference: settings per document

SettingWhere to find itWhat it controls
Output file typeClick the document name in Document TemplatesWord, PDF, or both for Word-based templates
Hide from end userDocument Templates tab, checkboxWhether the questionnaire taker sees the finished documents
Send to emailDocument Templates tab, email fieldAuto-sends documents to a specified address on completion
Conditional generationDocument Templates > LogicWhich documents generate based on questionnaire answers
Generate MultipleClick the document name in Document TemplatesOne document generated per repeating item instance