Generate Document Single in Power Automate
PDF4me Generate Document Single action enables dynamic single document creation in Power Automate using Word, HTML, or PDF templates with mustache syntax or merge fields. This versatile action transforms JSON or XML data into professional documents, perfect for personalized reports, certificates, invoices, and custom forms across Microsoft 365 workflows.
Authenticating Your API Request
To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful document generation services.
.webp)
Key Features
- Multi-Template Support: Use Word, HTML, or PDF templates with mustache/merge field syntax
- Flexible Data Sources: Accept JSON and XML formatted data for template population
- Dynamic Content: Map flow variables and previous action outputs to template fields
- Multiple Output Formats: Generate documents in PDF, Word, Excel, or HTML formats
- Advanced Metadata: Configure field behaviors with optional metadata settings
Parameters
Complete list of parameters for the Generate Document Single action. Configure these parameters to control document generation.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Template File Type*** | Option | Template Format Selection • Word - DOCX templates with merge fields or mustache syntax • HTML - HTML templates with mustache placeholders • PDF - PDF templates with fillable form fields • Determines template processing method | Word |
| Template File Name*** | String | Template File Identifier • Specify file name with proper extension (.docx, .html, .pdf) • Used for processing and output naming • Must match Template File Type selection • Supports dynamic values from flow variables | CertificateTemplate.docx |
| Template File Data*** | Binary | Template File Content • Map template file content from previous action • Retrieve from SharePoint, OneDrive, email attachments • Can be static file or dynamically selected • Must be valid file matching Template File Type | [File Content from Get File] |
| Document Data Type*** | Option | Data Format Selection • JSON - JSON formatted data for template population • XML - XML formatted data for template population • Must match format of provided data • Determines data parsing method | JSON |
| Document Data File*** | Binary | Data File Content • Map data file containing JSON or XML content • Alternative to Document Data Text parameter • Use when data is stored in file format • Takes precedence over Document Data Text if both provided | [Data File from Get File] |
| Document Data Text | String | Manual Data Input • Manually enter JSON or XML data as text • Required only if Document Data File not mapped • Supports dynamic content from flow variables • Useful for inline data or previous action outputs | {"name":"John","course":"Azure"} |
| File Meta Data | String | Additional Field Configuration • Optional metadata in JSON format for advanced settings • Configure field formatting and behaviors • Specify data transformation rules • Define conditional logic for fields | {"dateFormat":"YYYY-MM-DD"} |
| Output Type*** | Option | Generated Document Format • PDF - Output as PDF document • Word - Output as Word DOCX document • Excel - Output as Excel XLSX spreadsheet • HTML - Output as HTML web file | PDF |
Output
The PDF4me Generate Document Single action returns comprehensive output data for seamless Power Automate flow integration:
- Table
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| File Content | Binary | The complete generated document in binary format ready for downstream actions |
JSON Response Format
{
"File Content": "[Binary Content of Generated Document]"
}
Power Automate Flow Usage
Use generated document in subsequent actions:
- Email Delivery: Send document via Outlook to recipients
- SharePoint Storage: Save to SharePoint document libraries
- OneDrive Save: Store in OneDrive for Business folders
- Teams Posting: Share document in Teams channels
- Print Service: Send to printer for physical output
- Further Processing: Use as input for additional PDF4me actions
Workflow Examples
The PDF4me Generate Document Single action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Certificate Generation
- Quote Generation
- Welcome Package
- Inspection Reports
Automated Course Completion Certificate Workflow
Transform your training operations with automated certificate creation for course completions:
Complete Workflow Steps:
- Trigger: Student completes course in Learning Management System (LMS)
- Get Student Data: Retrieve student name, course title, completion date
- Get Template: Fetch certificate Word template from SharePoint
- Prepare JSON: Format student data as JSON for template fields
- Generate Certificate: Create PDF certificate with student information
- Add Serial Number: Assign unique certificate number from list
- Email Student: Send certificate PDF to student email address
- Store Record: Save certificate in SharePoint certificates library
Business Benefits:
- Generates 200+ certificates monthly without manual intervention
- Reduces certificate creation time from 15 minutes to 30 seconds
- Eliminates typos and formatting errors in certificates
- Provides instant certificate delivery improving student satisfaction
Automated Sales Quotation Creation Workflow
Streamline your sales process with automated quotation generation from CRM opportunities:
Complete Workflow Steps:
- Trigger: Opportunity stage changed to "Proposal" in Dynamics 365
- Get Opportunity Data: Retrieve products, pricing, customer details
- Calculate Pricing: Compute subtotal, discounts, tax, total amount
- Get Quote Template: Fetch company quotation HTML template
- Generate Quote: Create professional PDF quote with all details
- Add Quote Number: Assign sequential quote number and validity date
- Email Sales Rep: Send quote PDF to sales representative
- Update CRM: Attach quote to opportunity record in Dynamics
Business Benefits:
- Creates 100+ quotes weekly with zero manual effort
- Reduces quote preparation time from 1 hour to 2 minutes
- Ensures accurate pricing with automated calculations
- Accelerates sales cycle by 40% with instant quote delivery
Automated Employee Welcome Package Workflow
Enhance your onboarding experience with automated welcome document creation:
Complete Workflow Steps:
- Trigger: New employee record created in HR system
- Get Employee Info: Retrieve name, department, start date, manager
- Get Welcome Template: Fetch welcome letter PDF template
- Prepare Data: Format employee information as JSON
- Generate Welcome Letter: Create personalized PDF welcome document
- Get Policy Template: Fetch company policy acknowledgment template
- Generate Policy Doc: Create policy document with employee details
- Email HR & Employee: Send welcome package to both parties
Business Benefits:
- Generates welcome packages for 50+ new hires monthly
- Provides consistent onboarding experience for all employees
- Reduces HR admin time by 3 hours per new hire
- Creates positive first impression with professional documents
Automated Inspection Report Generation Workflow
Optimize your quality control with automated inspection report creation:
Complete Workflow Steps:
- Trigger: Inspection form submitted in Microsoft Forms
- Get Form Data: Extract inspection results, findings, photos
- Get Inspector Details: Retrieve inspector name, certification, date
- Get Template: Fetch inspection report Word template
- Generate Report: Create PDF inspection report with all findings
- Add Photos: Embed inspection photos in appropriate sections
- Email Stakeholders: Send report to manager and facility team
- Archive Report: Store in SharePoint quality control library
Business Benefits:
- Generates 150+ inspection reports monthly automatically
- Eliminates 2 hours of manual report writing per inspection
- Ensures compliance with standardized report formatting
- Enables immediate issue escalation with instant report delivery
Industry Use Cases & Applications
- Education & Training
- Sales & Marketing
- Human Resources
- Operations & Quality
Education & Training Use Cases
- Course Certificates: Generate completion certificates for online courses
- Student Reports: Create personalized progress reports for students
- Transcripts: Produce official academic transcripts automatically
- Award Letters: Generate scholarship and award notification letters
Sales & Marketing Use Cases
- Proposals: Create customized sales proposals from CRM data
- Quotes: Generate professional quotations with pricing details
- Contracts: Produce sales contracts with customer information
- Brochures: Create personalized marketing materials for prospects
Human Resources Use Cases
- Offer Letters: Generate employment offer letters for candidates
- Welcome Packages: Create new hire welcome documentation
- Performance Reviews: Produce formatted performance review documents
- Termination Letters: Generate exit documentation automatically
Operations & Quality Use Cases
- Inspection Reports: Create quality inspection documentation
- Audit Reports: Generate compliance audit reports
- Incident Reports: Produce safety incident documentation
- Work Orders: Create formatted work order documents