Skip to main content

Automation Flow: Document Generation

Generate PDFs, JSON documents, and DOCX documents from templates using automation flows.

Written by James Ross

Overview

Document generation flows create files from form submission data. Generated documents are stored in ProcessPro and can be passed to downstream save flows for archiving to SharePoint, Azure, or external APIs.

Quick Steps

Generate Submission Pdf

  • Complete a form submission on the activity.

  • The Generate Submission Pdf flow triggers automatically.

  • A PDF is generated containing all form fields, labels, and values.

  • The PDF is persisted to the AutomationGeneratedDocument table.

  • A GeneratedDocumentId is set on the automation context for downstream flows.

  • The audit records the PDF generation with the GeneratedDocumentId reference.

Generate Submission Json

  • Complete a form submission with data in repeater fields.

  • The Generate Submission Json flow triggers.

  • A JSON template is loaded from config, with tokens replaced by actual submission values.

  • The result is persisted to AutomationGeneratedDocument.

  • The GeneratedDocumentId is available for upload flows.

Generate Document From Template

  • Complete a form submission on the activity.

  • The Generate Document From Template flow triggers.

  • A DOCX template is loaded from the template repository.

  • Tokens in the template are replaced with submission field values and workflow metadata.

  • The output document is generated and stored.

  • The MainDocument is set on the automation context for save flows.

Chaining with Save Flows

Document generation flows are designed to work with save flows. A typical pipeline:

  1. Generate Document From Template (or Generate Submission Pdf)

  2. Save Generated Document To ProcessPro (uploads to Managed Documents)

  3. Save Generated Document To SharePoint (uploads to SharePoint)

Each flow receives the GeneratedDocumentId from the previous flow via the automation context.

Note: Multiple automation flows can be chained on a single activity. Each flow executes in sequence, passing context between them.

Related Articles

Did this answer your question?