Workflow Step - Advanced Document Generation 


In this Article
Related Articles

Introduction

Combine a customized template with Workflow’s Document step to create and distribute dynamic PDFs incorporating form response data. This article covers the basics of tagging your document template and the steps to configure the Document step in your workflow. 


Requirements

To use Advanced Document Generation, a FormAssembly user must

  • be part of a Team plan or higher
  • have Content Management user permissions enabled for their login
  • specifically, the Advanced document generation must be enabled for the user account

File Upload Restrictions

  • Files must be of type .DOC, .DOCX, .PPT, or .PPTX
  • Upload size limit is 30MB

Demo



Add a Document Step to a Workflow

Note: Advanced Documentation Generation is in Beta
  • Select Add Step
  • Select Document

Upload a Tagged File

A tagged file created outside of FormAssembly, uploaded to the Document step, is used as a template for the PDF generated by the Document step. See the File Tagging section of this article for more information about how to format tags within your file.

File Upload Restrictions

  • Files must be of type .DOC, .DOCX, .PPT, or .PPTX
  • Upload size limit is 30MB

File Tagging

Tags map positions on your document template where you intend to fill data as configured in the Document step. 

Tags

Tags are made with a {{ start tag, tag name, and }} closing tag. 

In its most basic form, a tag could look like the following example:

{{tag_name}}

Use tags to designate places on your document template where form field values (or other values and variables configured in the Document Step) should go.

Loops

{{loop loop_name}} ... {{endloop}}

Use loops to tag repeatable sections on your document template and later map them to repeatable sections in your form responses. 

Loops can be nested and combined with IF statements.

IF Statements

{{if condition_name}} ... {{endif}}

The value mapped to the condition (“condition_name” above) is converted to a boolean. 

When using an IF statement, the templated area between the beginning and end of the IF statement is only applied when the condition is TRUE. 

It is evaluated as FALSE when either:

  • The value is false, "", 0, or null
  • The value is not configured in the Document Step where the template is uploaded

IF statements can also have an {{else}} clause.

{{if cond}} ... {{else}} ... {{endif}}

An else clause would apply only when the initial IF statement condition is FALSE.

Upload File Tag Behaviors in Document Step Configuration:

  • Tags (not wrapped in a loop)
    • Results in a Document section, within the Configuration tab, with one mapping row per tag.
  • Tags in a Loop
    • Results in Repeatable Content Mapping in a new section below the Document section with the default name of the loop’s variable name (“loop_name” above).
  • IF Statement
    • Results in Conditional Content in the Document section where Conditional Rules can be applied.

Document Step Mapping

Each tag created from the template will result in data on the document that can be mapped to fields, formulas, values, or variables.

  • Field: Use the list to search for and select a form field from the forms included in the workflow
    • If a Choice Field is selected, the respective choice fields appear under the field mapping
    • If a Repeatable Field is selected, a repeatable content section should be added within that mapping section, with “workflow” selected by default
Note: Selecting workflow means there will be one event created, and repeating content will be merged and comma separated in the same event
  • Value or Formula: Enter a value as text or open the formula editor to build a formula.
  • Variable: Select an existing workflow variable from the dropdown

Conditional Content

When an uploaded document template has an IF statement, conditional content becomes available within the associated section where a condition can be applied to each IF statement.

Conditional logic dropdown options include

  • All conditions must be satisfied” 
  • Any condition can be satisfied
  • Custom
  • When Custom is chosen, the user can input custom logic text with AND or OR statements

Loops

When an uploaded document template has a loop tag, an additional section on the Configure tab becomes available for each loop within the template file.

  • One section should exist per loop
  • Section title defaults to “[loop_name] Section”
  • The section contains a mapping for all tags in the loop

Dependencies

A dependency can be added to each section. A section dependent on another section will only run after the section designated as its dependency runs. 

  • Adding a dependency adds a blank “Run after” dropdown menu
    • The dropdown options are all sections available within the Configure tab
Note: When adding a dependency to a dependent action, a dependent action cannot use the action it is a dependency for as a dependent action.

Workflow Response Document

When the Document step of a workflow runs, a Document card is created in the workflow response. Access the generated PDF file by selecting the Download link.


Send PDF File

The PDF document generated by a Document step can be sent through connectors.

The PDF document name can be chosen in the “Send file” dropdown of a file upload connector’s steps, such as the Google Drive Connector, Microsoft SharePoint Connector, or Salesforce Connector.


Terms of Service · Privacy Policy