Document generation connections and models
Document generation utilizes the Documents connection and the associated document actions to generate a document. There are several ways you can generate a document using these actions, with the most common way adding a button to a page that is used to generate a document through an action flow. Think of it like a workflow that automatically happens behind the scenes, generally without much input from the your or the user generating document.
Generating a document from a page requires the use of the Documents connection. The Documents connection contains:
-
Three document actions:
-
Generate Document
-
Download
-
Wait until Generated
-
-
Two models:
-
DocGen Instance (List)
-
DocGen Instance (Detail)
-
Document connections and models
Document connections and objects have been added as available models when creating a new page or adding a button to an existing page.
Please reference the following topics for more information on models and data connections and how they are used when designing a page:
Available Connections
Documents
For document generation a connection type is available called Documents. The Documents connection is used for:
-
Adding one or more of the available document generation actions
-
Adding a new document model to a page
Note: The Documents connection is managed connection through Nintex and is not considered an External connection. The Documents connection cannot be modified.
Available Models
DocGen Instance (List)
When selecting Documents as a connection, when adding a model to a page, the DocGen Instance (List) option becomes available as a data object. The DocGen Instance (List) contains the following object fields:
-
Id
-
startDate
-
endDate
-
packageName
-
status
This object type is useful for creating a list of generated documents in a table, and adding a run action for downloading the document based off of the Id. For a scenario using this object field refer to Advanced document generation using DocGen actions.
DocGen Instance (Detail)
When selecting Documents as a connection, when adding a model to a page, the DocGen Instance (Detail) option becomes available as a data object. The DocGen Instance (Detail) contains the following object fields:
-
Id
-
startDate
-
error
-
errorId
-
status
Document generation actions and their associated behaviors
To use document generation features you will need to understand how to get the basic document actions set up. Each document action requires additional settings to be configured in the Settings menu.
There are three document actions available:
-
Generate Document: Generates and downloads the document all in one action. Good for simple scenarios where a user needs to generate a document such as an invoice, contract, or NDA. This is the most common action to use as it is highly configurable and is the quickest action to get set up and running. The most common use of the Generate Document action is through the use of a "Generate Document" button added to a page. For more information on how to use the Generate Document action refer to Add document generation action to page.
-
Download Document: Asynchronously downloads the document based off of a DocGen instance ID. The most common use of this button is through a "Download" button added to a page, most likely contained within a table containing a list of generated documents.
-
Wait Until Generated: Asynchronously runs a document generation based off of a DocGen instance ID, but waits for user input to download the document. This action is useful for workflows that require user input or action, either to confirm an action or review an item in the workflow.
Important: Documents generated are stored temporarily, only for 24 hours. This allows for enough time for you to download the document and save it to another storage location, such as Box.
How you decide to use the above actions is going to largely depend on how you want the document generate action when a user goes to generate a document. Once these actions have been selected there are several options that can then be set in the Settings menu.
The above screen shot shows the Settings menu displayed for the Generate Document action.
Document action reference tables
Use the reference table below for reference on each action and fields associated with that action.

Field name | Description |
Behavior |
Determines the behavior of the action. There are four options available with the Generate Document action:
Depending on the browser you are using some of these options may not work as intended as not every browser supports downloading a document or opening a document in a new window or tab. |
Override FileName |
Allows the designer to set an override for the file name for the document that gets generated. For example, let's say the document is named "Quote_Proposal" the designer could set the override name to be "Proposal Letter". |
Package |
A drop-down menu that displays all of the document packages that can be associated with this document action flow. Once a document package is selected a list of all defined tags in the Tagger displays underneath the field. Requires that you have already created a document package and uploaded a document to the package. For more information refer to Create a document package. |
Named outputs: Action response |
This field is used to define an output for this action that can then be referenced by later actions, such as an error message or success download message. Merge Syntax used: $Output.NamedOutputName.body.startDate Named Outputs variable:
For example, let's say you wanted to display the status of a document. This would display a message such as "running", "completed", or "error". The syntax would be as follows: $Output.DocumentStatus.body.status In this example "DocumentStatus" is the named instance you assigned to the output. The name of the generated output can be whatever you want to name it. |

Field name | Description |
Behavior |
Determines the behavior of the action. There are two options available with the Download Document action:
Depending on the browser you are using some of these options may not work as intended as not every browser supports downloading a document or opening a document in a new window or tab |
Instance |
Sets the instance ID for the action. Syntax: {{$Input.namedinstance}} The named instance can either come from a model or a previous action, such as a click action or document action.
|
Override FileName |
Allows the designer to set an override for the file name for the document that gets generated. For example, lets say the document is named "Quote_Proposal" the designer could set the override name to be "Proposal Letter". |
Named outputs: Action response |
This field is used to define an output for this action that can then be referenced by later actions, such as an error message or success download message. Merge Syntax used: $Output.NamedOutputName.body.startDate Named Outputs variable:
For example, let's say you wanted to display the status of a document. This would display a message such as "running", "completed", or "error". The syntax would be as follows: $Output.DocumentStatus.body.status In this example "DocumentStatus" is the named instance you assigned to the output. The name of the generated output can be whatever you want to name it. |

Field name | Description |
Instance |
Sets the instance ID for the action. Syntax: {{$Input.namedinstance}} The named instance can either come from a model or a previous action, such as a click action or document action.
|
Named outputs: Action response |
This field is used to define an output for this action that can then be referenced by later actions, such as an error message or success download message. Merge Syntax used: $Output.NamedOutputName.body.startDate Named Outputs variable:
For example, let's say you wanted to display the status of a document. This would display a message such as "running", "completed", or "error". The syntax would be as follows: $Output.DocumentStatus.body.status In this example "DocumentStatus" is the named instance you assigned to the output. The name of the generated output can be whatever you want to name it. |