HTML to PDF in Power Automate
PDF4me HTML to PDF action converts HTML content and files to professional PDF documents in Power Automate with advanced rendering capabilities. This versatile conversion feature supports single HTML files, ZIP archives with HTML and assets, custom layouts, and preserves CSS styling, images, and formatting, perfect for creating reports, invoices, certificates, and documents from web content 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 HTML to PDF conversion services.

Key Features
- HTML File Support: Convert single HTML files or ZIP archives with assets
- CSS Preservation: Maintain all styling and formatting from HTML
- Image Embedding: Include images and graphics in converted PDFs
- Custom Layouts: Control page size and layout options
- Dynamic Content: Convert dynamically generated HTML to PDF
Parameters
Complete list of parameters for the HTML to PDF action. Configure these parameters to control HTML conversion.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Content*** | Binary | HTML File Content • Map HTML file content from previous action • Supports single HTML or HTML files in ZIP • ZIP should contain HTML and referenced assets • Can include CSS, JavaScript, images | [File Content from Get File] |
| HTML File Name*** | String | HTML File Name • Specify HTML file name to convert • Should include .html or .zip extension • For ZIP, this is the entry point file • Used for conversion processing | template.html |
| File Name | String | Index File Path • Index file path required when input is ZIP • Specifies main HTML file within ZIP archive • Relative path from ZIP root • Example: index.html or main.html | index.html |
| Layout*** | Option | Page Layout Format • Portrait - Vertical page orientation • Landscape - Horizontal page orientation • Controls output PDF page dimensions • Must specify value | Portrait |
Output
The PDF4me HTML to PDF 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 | Converted PDF file with rendered HTML content |
| PDF Content | String | Text content extracted from converted PDF |
JSON Response Format
{
"File Content": "[Binary Content of PDF]",
"PDF Content": "Extracted text from PDF"
}
Power Automate Flow Usage
Use converted PDF in subsequent actions:
- Email Distribution: Send HTML-generated PDFs via Outlook
- SharePoint Storage: Save converted documents to libraries
- Print Services: Send print-ready PDFs from HTML
- Client Delivery: Provide professionally formatted PDFs
- Archive Storage: Store HTML-generated reports
- Further Processing: Use in additional PDF operations
Workflow Examples
The PDF4me HTML to PDF action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Report Generation
- Invoice Generation
- Certificate Generation
- Email Archival
Automated HTML Report to PDF Workflow
Transform your reporting with HTML template to PDF conversion:
Complete Workflow Steps:
- Trigger: Scheduled trigger - monthly reporting on 1st at 9 AM
- Get Data: Query database for monthly metrics and KPIs
- Get HTML Template: Retrieve report HTML template from SharePoint
- Populate Template: Inject data into HTML template placeholders
- Convert to PDF: Transform populated HTML to PDF
- Add Branding: Apply company watermark and headers
- Email Distribution: Send PDF report to stakeholder list
- Archive Report: Store in SharePoint reports library
Business Benefits:
- Generates 50+ HTML-based reports monthly automatically
- Enables rich formatting with HTML/CSS capabilities
- Reduces report generation time from 4 hours to 10 minutes
- Maintains consistent professional appearance
Automated HTML Invoice to PDF Workflow
Streamline invoicing with HTML template to PDF conversion:
Complete Workflow Steps:
- Trigger: Order marked as "Shipped" in order system
- Get Order Data: Retrieve order items, pricing, customer info
- Get Invoice Template: Fetch HTML invoice template
- Populate Data: Fill template with order details
- Convert to PDF: Transform HTML invoice to PDF
- Add Company Logo: Embed branding elements
- Email Customer: Send professional PDF invoice
- Archive Invoice: Store in accounting SharePoint library
Business Benefits:
- Generates 500+ invoices monthly from HTML templates
- Enables sophisticated invoice designs with HTML/CSS
- Reduces invoice creation time from 10 minutes to 1 minute
- Improves brand presentation with custom HTML designs
Automated Certificate Generation from HTML
Optimize certificate creation with HTML to PDF conversion:
Complete Workflow Steps:
- Trigger: Student completes course in LMS
- Get Student Data: Retrieve name, course, completion date
- Get Certificate HTML: Fetch certificate HTML template
- Populate Fields: Insert student details into HTML
- Convert to PDF: Transform to professional PDF certificate
- Add Serial Number: Embed unique certificate number
- Email Student: Send PDF certificate to student
- Archive Certificate: Store in certificates SharePoint library
Business Benefits:
- Generates 200+ certificates monthly from HTML templates
- Enables elegant certificate designs with HTML/CSS
- Provides instant certificate delivery to students
- Maintains complete certificate issuance records
Automated Email HTML to PDF Archival
Enhance email archival with HTML email to PDF conversion:
Complete Workflow Steps:
- Trigger: Important email received in monitored inbox
- Get Email HTML: Extract HTML body content from email
- Get Attachments: Retrieve email attachments if present
- Convert to PDF: Transform HTML email to PDF format
- Add Email Metadata: Include sender, date, subject in PDF
- Attach Files: Embed original attachments in PDF
- Upload SharePoint: Store email PDF in correspondence library
- Update Index: Add to email archive search index
Business Benefits:
- Archives 300+ important emails monthly as PDFs
- Creates permanent record of HTML emails
- Enables email search and discovery in SharePoint
- Maintains email formatting and embedded images
Industry Use Cases & Applications
- Sales & Marketing
- Finance & Accounting
- Education & Training
- Healthcare & Medical
Sales & Marketing Use Cases
- Proposals: Convert HTML proposals to PDF for client delivery
- Marketing Materials: Transform HTML designs to PDF brochures
- Email Campaigns: Archive HTML email campaigns as PDFs
- Reports: Generate sales reports from HTML templates
Finance & Accounting Use Cases
- Invoices: Create PDF invoices from HTML templates
- Financial Reports: Generate reports from HTML dashboards
- Statements: Convert HTML statements to PDF format
- Receipt Generation: Create PDF receipts from HTML
Education & Training Use Cases
- Certificates: Generate certificates from HTML templates
- Course Materials: Convert HTML course content to PDF
- Report Cards: Create PDF report cards from HTML
- Learning Materials: Transform HTML lessons to PDF
Healthcare & Medical Use Cases
- Patient Reports: Generate PDF reports from HTML templates
- Test Results: Convert HTML lab results to PDF
- Medical Forms: Create PDF forms from HTML
- Documentation: Transform HTML medical docs to PDF