Skip to main content

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.

Generate Document Single Power Automate

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.

ParameterTypeDescriptionExample
Template File Type***OptionTemplate 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***StringTemplate 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***BinaryTemplate 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***OptionData 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***BinaryData 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 TextStringManual 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 DataStringAdditional 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***OptionGenerated 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 View

Response data in a structured table format:

ParameterTypeDescription
File ContentBinaryThe complete generated document in binary format ready for downstream actions

Workflow Examples

The PDF4me Generate Document Single action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Course Completion Certificate Workflow

Transform your training operations with automated certificate creation for course completions:

Complete Workflow Steps:

  1. Trigger: Student completes course in Learning Management System (LMS)
  2. Get Student Data: Retrieve student name, course title, completion date
  3. Get Template: Fetch certificate Word template from SharePoint
  4. Prepare JSON: Format student data as JSON for template fields
  5. Generate Certificate: Create PDF certificate with student information
  6. Add Serial Number: Assign unique certificate number from list
  7. Email Student: Send certificate PDF to student email address
  8. 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

Industry Use Cases & Applications

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

Get Help