Dev: Flow Download Button
Published on February 10, 2026 DRTE
Download Document Buttons for Flow Screens
The DRTE Extension adds download buttons to Salesforce Flow screens so users can generate and download documents from a template in a single click. This guide covers the available components and the Flow setup required to use them.
Flow screen showing the DRTE download button components.
Available Screen Components
The extension provides four Lightning Web Components that can be added to any Flow screen:
| Component | Output |
|---|---|
| Download Docx Button | Microsoft Word document |
| Download PDF Button | PDF file |
| Download PPTx Button | PowerPoint presentation |
| Download Xlsx Button | Excel spreadsheet |
Implementation Workflow
Build the Flow in Flow Builder using the following sequence of logic and screen elements.
Step 1: Data Retrieval
- Get Object API Name: Use a DRTE Extension Managed Action (Apex Action) to identify the relevant Object API name.
- Get Doc Templates: Use a "Get Records" element to retrieve the necessary document templates.
Step 2: User Selection
- Show Data Table: A screen element ("Screen1") presents a Data Table so the user can select the desired template for their document.
Step 3: Document Generation
- Generate HTML: An Apex Action takes the selected template and data to generate the HTML content required for the document.
Step 4: Final Download
Final download screen (Screen2) with the download button.
- Download Screen: The final screen ("Screen2") uses the generated HTML to enable the download buttons.
- User Interaction: The screen confirms the document has been generated and prompts the user to click the download button to begin the download.
Developer Note
The extension is designed to handle "larger files". The download may take a few moments to complete after the user clicks the button on the screen.
Knowledge Article Number: KA-00119