Configure document templates using the WYSIWYG editor. Access and manage your templates through the Document Templates section in your Project in FlowX Designer.

Generating documents from HTML templates
The Documents plugin generates documents from predefined templates. This guide focuses on generating documents using HTML templates.
Before you begin
- Verify access permissions: Ensure you have the necessary permissions to manage document templates.
- Check Kafka configuration: Confirm that Kafka is properly configured and accessible:
- The document plugin relies on Kafka for communication between nodes
- Familiarize yourself with the required Kafka topics (detailed later in this guide)
Creating an HTML template
- Access the WYSIWYG editor through FlowX Designer → Plugins → Document templates
- Create or import your HTML template

Managing HTML templates
Implementing document generation in a process
Let’s build a document generation flow that creates personalized documents based on user input:
Step 1: Create a user input form
- Add a User Task node to your process
- Configure UI elements to collect the information needed for your document:
- Input fields (text, numbers, dates, etc.)
- Make sure to set appropriate keys for each field that match your template variables
Step 2: Configure the document generation request
- Add a Send Message Task (Kafka) node
- Configure the Kafka send action with the appropriate topic:
- For HTML template generation, use
ai.flowx.plugin.document.trigger.generate.html.v1(or your configured equivalent, set viaKAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN)
- For HTML template generation, use

- Create the request payload with the following structure:

- customId: Folder name where the file will be saved
- templateName: Name of the template defined in Document templates
- language: Must match the language configured on the template
- data: Key-value pairs mapping template variables to process data
- includeBarcode: Set to true if you need a barcode on the document
When using templates in a process, the system uses default values from the default project language. For example, if English is your default project language, the template will use values from the English version.To check your default language: FlowX Designer → Project Settings → Languages
Generating DOCX output
SaaS ·Available on SaaS with FlowX.AI . This feature is live on managed (SaaS) deployments now. Self-hosted deployments receive it with the next LTS release.
outputFormat to a document entry in the request payload:
- outputFormat:
PDForDOCX. When omitted, the document is generated as PDF. - The generated DOCX preserves the template’s styles, data, and images, and is stored and returned the same way as a PDF.
- includeBarcode applies to PDF output only; it is ignored when generating DOCX.
Step 3: Receive the generated document
- Add a Receive Message Task (Kafka) node
- Configure it with:
- The response topic:
ai.flowx.engine.receive.plugin.document.generate.html.results.v1(or your configured equivalent, set viaKAFKA_TOPIC_DOCUMENT_GENERATE_HTML_OUT) - Key for storing the response:
generatedDocuments
- The response topic:


- fileId: Unique identifier for the generated file
- documentType: Template name used for generation
- minioPath: Storage location (MinIO or S3)
- downloadPath: URL path for downloading the file
- noOfPages: Document page count
- error: Error information (null if successful)
Displaying the generated document
To display the generated document to the user:- Add a Task Node to extract the document path from the response
- Add a User Task with the File Preview UI Element:
- Configure the element with the download path from the previous node


