Integrate pdf-mcp with Make (formerly Integromat) to automate PDF generation in your scenarios. This guide covers setting up HTTP modules to generate invoices, reports, certificates, and any HTML-based documents.
What is Make?
Make is a powerful visual automation platform that connects apps and services with advanced logic capabilities. With pdf-mcp integration, you can:
- Generate PDFs when forms are submitted or webhooks trigger
- Create invoices automatically from e-commerce events
- Produce reports on schedules or data changes
- Convert HTML templates to PDFs in any scenario
Prerequisites
Before you begin:
- A Make account (Free or paid plan)
- A pdf-mcp account with an API key (Get your API key)
- Basic familiarity with Make scenarios
Quick Setup
Step 1: Create a New Scenario
- Log into make.com and click Create a new scenario
- Add your trigger module (the event that starts the scenario)
- Click the + button to add another module
Step 2: Add HTTP Module
- Search for HTTP in the module search
- Select HTTP > Make a request
- Click the module to configure it
Step 3: Configure the Request
Configure the HTTP module with these settings:
| Field | Value |
|---|---|
| URL | https://api.pdf-mcp.io/htmlToPdf |
| Method | POST |
| Headers | See configuration below |
| Body type | Raw |
| Content type | JSON (application/json) |
HTTP Module Configuration
Basic Settings
| Setting | Value |
|---|---|
| URL | https://api.pdf-mcp.io/htmlToPdf |
| Method | POST |
| Body type | Raw |
| Content type | JSON (application/json) |
Headers
Add a header for authentication:
| Name | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
Replace YOUR_API_KEY with your actual API key from the dashboard.
Request Body (JSON)
{
"html": "<h1>Hello from Make!</h1><p>This PDF was generated automatically.</p>",
"filename": "document.pdf"
}
Response Handling
Configure the response settings:
| Setting | Value |
|---|---|
| Parse response | Yes |
Step-by-Step HTTP Module Setup
1. Add HTTP Module
After your trigger module, click + and search for “HTTP”:
- Select HTTP
- Choose Make a request
- The configuration panel will open
2. Configure URL and Method
| Field | Value |
|---|---|
| URL | https://api.pdf-mcp.io/htmlToPdf |
| Method | POST |
3. Add Headers
Click Add a header and configure:
| Name | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
4. Configure Body
| Field | Value |
|---|---|
| Body type | Raw |
| Content type | JSON (application/json) |
5. Add Request Content
In the Request content field, enter your JSON payload:
{
"html": "<h1>Hello from Make!</h1><p>Generated automatically.</p>",
"filename": "document.pdf"
}
6. Configure Response Handling
Expand Show advanced settings:
| Setting | Value |
|---|---|
| Parse response | Yes (if you need JSON response) or No (for binary PDF) |
7. Test the Module
Click Run once to test. If successful, the module output will contain your PDF data.
Ready-to-Copy Module Configuration
Copy these settings directly into your Make HTTP module:
HTML to PDF Module
URL:
https://api.pdf-mcp.io/htmlToPdf
Method: POST
Headers:
Authorization: Bearer YOUR_API_KEY
Body type: Raw
Content type: JSON (application/json)
Request content:
{
"html": "<h1>Document Title</h1><p>Your content here.</p>",
"css": "@page { size: A4; margin: 2cm; }",
"filename": "document.pdf"
}
Dynamic HTML with Make Variables
Use Make’s variable mapping to create dynamic PDFs from your trigger data.
Using Variables in JSON
Make uses double curly braces {{}} for variable mapping. In the JSON editor:
{
"html": "<h1>Invoice #{{1.invoice_number}}</h1><p>Customer: {{1.customer_name}}</p><p>Amount: ${{1.amount}}</p>",
"filename": "invoice-{{1.invoice_number}}.pdf"
}
The numbers (e.g., 1.) refer to the module position in your scenario.
Example: Form Response to PDF
If your trigger is a webhook or form submission:
{
"html": "<!DOCTYPE html><html><head><title>Submission</title></head><body><h1>Form Submission</h1><p><strong>Name:</strong> {{1.name}}</p><p><strong>Email:</strong> {{1.email}}</p><p><strong>Message:</strong> {{1.message}}</p><p><em>Submitted: {{formatDate(now; \"MMMM D, YYYY\")}}</em></p></body></html>",
"filename": "submission-{{1.submission_id}}.pdf"
}
Example: Invoice Generation
For e-commerce or payment triggers:
{
"html": "<!DOCTYPE html><html><head><title>Invoice</title></head><body><h1>Invoice #{{1.invoice_number}}</h1><p>Customer: {{1.customer_name}}</p><p>Email: {{1.customer_email}}</p><table style=\"width:100%; border-collapse:collapse;\"><tr style=\"background:#f0f0f0;\"><th style=\"border:1px solid #ddd; padding:8px;\">Description</th><th style=\"border:1px solid #ddd; padding:8px;\">Amount</th></tr><tr><td style=\"border:1px solid #ddd; padding:8px;\">{{1.product_name}}</td><td style=\"border:1px solid #ddd; padding:8px;\">${{1.amount}}</td></tr></table><p><strong>Total: ${{1.amount}}</strong></p></body></html>",
"css": "@page { size: A4; margin: 2cm; } body { font-family: Arial, sans-serif; }",
"filename": "invoice-{{1.invoice_number}}.pdf"
}
Example: Certificate Generation
For course completions or achievements:
{
"html": "<!DOCTYPE html><html><head><title>Certificate</title></head><body style=\"text-align:center; padding:50px;\"><h1 style=\"font-size:36px; color:#333;\">Certificate of Completion</h1><p style=\"font-size:24px; margin:30px 0;\">This is to certify that</p><p style=\"font-size:32px; font-weight:bold; color:#1a73e8;\">{{1.recipient_name}}</p><p style=\"font-size:24px; margin:30px 0;\">has successfully completed</p><p style=\"font-size:28px; font-weight:bold;\">{{1.course_name}}</p><p style=\"margin-top:50px;\">Date: {{formatDate(now; \"MMMM D, YYYY\")}}</p></body></html>",
"css": "@page { size: landscape; margin: 2cm; }",
"filename": "certificate-{{1.recipient_name}}.pdf"
}
Common Use Cases
1. Webhook to PDF Document
[Webhooks] → [HTTP: Generate PDF] → [Email: Send Attachment]
Trigger: Webhooks - Custom webhook receives data Action 1: HTTP - Make a request to pdf-mcp Action 2: Email - Send with PDF attachment
2. Google Sheets to PDF Report
[Google Sheets: Watch Rows] → [HTTP: Generate PDF] → [Google Drive: Upload]
Trigger: Google Sheets - Watch New Rows Action 1: HTTP - Generate PDF from row data Action 2: Google Drive - Upload file to folder
3. Stripe Payment to Invoice
[Stripe: Watch Events] → [HTTP: Generate Invoice PDF] → [Dropbox: Upload]
Trigger: Stripe - Watch Events (payment completed) Action 1: HTTP - Generate invoice PDF Action 2: Dropbox - Upload File
4. Airtable Record to Certificate
[Airtable: Watch Records] → [HTTP: Generate Certificate] → [Gmail: Send]
Trigger: Airtable - Watch Records Action 1: HTTP - Generate certificate PDF Action 2: Gmail - Send email with attachment
5. Scheduled Report Generation
[Schedule] → [Database Query] → [HTTP: Generate Report] → [Slack: Post Message]
Trigger: Schedule - Run at specific time Action 1: Query your database for data Action 2: HTTP - Generate PDF report Action 3: Slack - Post link to report
All API Endpoints
Configure your HTTP module with these endpoints:
| Endpoint | Method | Description |
|---|---|---|
/htmlToPdf | POST | Convert HTML to PDF |
/textToPdf | POST | Convert plain text to PDF |
/imageToPdf | POST | Convert images to PDF |
/pdfToImage | POST | Convert PDF pages to images |
/extractText | POST | Extract text from PDF |
/extractPages | POST | Extract specific pages |
/mergePdfs | POST | Combine multiple PDFs |
/pageCount | POST | Get PDF page count |
See the API Reference for detailed documentation on each endpoint.
cURL Examples
Test the API directly before configuring Make:
Basic HTML to PDF
curl -X POST https://api.pdf-mcp.io/htmlToPdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Hello, World!</h1><p>Generated from Make scenario.</p>"
}' \
--output document.pdf
Styled Invoice
curl -X POST https://api.pdf-mcp.io/htmlToPdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<!DOCTYPE html><html><head><title>Invoice</title></head><body><h1>Invoice #12345</h1><table><tr><th>Item</th><th>Amount</th></tr><tr><td>Service Fee</td><td>$99.00</td></tr></table><p>Total: $99.00</p></body></html>",
"css": "@page { size: A4; margin: 2cm; } body { font-family: Arial, sans-serif; } table { width: 100%; border-collapse: collapse; } th, td { border: 1px solid #ddd; padding: 8px; }",
"filename": "invoice-12345.pdf"
}' \
--output invoice-12345.pdf
Text to PDF
curl -X POST https://api.pdf-mcp.io/textToPdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Meeting Notes\n\nDate: January 15, 2025\n\n1. Project status review\n2. Timeline discussion\n3. Next steps",
"filename": "meeting-notes.pdf"
}' \
--output meeting-notes.pdf
MCP Integration
Using AI Agents? MCPs (Model Context Protocols) provide plug-and-play connectivity with pdf-mcp. AI agents like Claude can generate PDFs natively using our MCP Server without any HTTP configuration.
Handling the Response
The HTTP module returns the PDF as binary data. Here’s how to work with it in subsequent modules:
Save to Cloud Storage
Connect to Google Drive, Dropbox, OneDrive, or other storage modules:
- Add a storage module after the HTTP module
- Map the
dataoutput from the HTTP module to the file content - Specify the filename and destination folder
Send via Email
Use Gmail, Outlook, or other email modules:
- Add an email module after the HTTP module
- In the attachment field, map the HTTP module’s response data
- Set the attachment filename
Download Locally (for testing)
Use the Make DevTool browser extension to download files during testing.
Store in Database
Encode the binary data as base64 and store in your database if needed.
Working with Binary Data
Make handles binary data through its data bundles. To work with PDF files:
Passing to Storage Modules
Most storage modules (Google Drive, Dropbox, etc.) accept binary data directly:
- In the file content field, select the
dataoutput from the HTTP module - Specify the filename with
.pdfextension
Passing to Email Attachments
Email modules typically accept binary attachments:
- Map the HTTP response body to the attachment data
- Set the filename (e.g.,
document.pdf) - Set the content type to
application/pdf
Converting to Base64
If you need base64 encoding, use Make’s toString function:
{{toString(HTTP_MODULE.data; "base64")}}
Error Handling
Make provides robust error handling with routes and error handlers.
Common Status Codes
| Code | Description | Solution |
|---|---|---|
| 200 | Success | PDF generated successfully |
| 401 | Unauthorized | Check your API key in headers |
| 403 | Forbidden | Verify API key permissions or credit balance |
| 400 | Bad Request | Check your request body format |
| 500 | Server Error | Review HTML syntax or contact support |
Adding Error Handlers
- Right-click on the HTTP module
- Select Add error handler
- Choose the handler type:
- Resume: Continue with default value
- Rollback: Undo previous operations
- Commit: Save completed operations
- Ignore: Skip errors silently
Using Routers for Error Paths
Add a Router after the HTTP module to handle success and error cases separately:
[HTTP Module] → [Router]
├── Route 1: Status = 200 → [Continue with PDF]
└── Route 2: Status != 200 → [Send Alert/Log Error]
Configure the router filters:
- Route 1 filter:
{{HTTP_MODULE.statusCode}} = 200 - Route 2 filter:
{{HTTP_MODULE.statusCode}} != 200
Troubleshooting
PDF is empty or not generated
- Verify your API key is correct and has credits
- Check that the
htmlfield contains valid HTML - Ensure the JSON is properly formatted
- Test with a simple HTML string first
Authentication errors (401/403)
- Check the Authorization header format:
Bearer YOUR_API_KEY - Ensure there’s a space between “Bearer” and your key
- Verify your API key hasn’t been revoked
- Check your credit balance in the dashboard
Module timeout
- Large or complex HTML may take longer to process
- Increase the timeout in advanced settings (Settings > Timeout)
- Simplify your HTML template
- Use inline styles instead of external resources
Invalid JSON errors
- Validate your JSON in the Make editor
- Escape special characters in strings (use
\"for quotes) - Check for trailing commas or missing brackets
- Use Make’s JSON functions for complex data
Variable mapping issues
- Verify module numbers match your scenario layout
- Use the variable picker to ensure correct paths
- Test each module individually with hardcoded values
- Check that trigger data contains expected fields
Binary data not recognized
- Ensure Parse response is set correctly
- Some downstream modules need specific content types
- Try base64 encoding for problematic integrations
Tips and Best Practices
Performance
- Keep HTML simple for faster generation
- Use inline CSS instead of external stylesheets
- Compress images before including them
- Avoid unnecessary complexity in templates
Reliability
- Test scenarios thoroughly before activating
- Use Make’s execution history to debug issues
- Set up error notifications for critical scenarios
- Schedule non-urgent operations during off-peak hours
Security
- Never expose your API key in shared scenarios
- Use Make’s connection feature for secure credential storage
- Limit scenario sharing to trusted team members
- Review data exposure in public scenarios
Cost Optimization
- Use filters to only generate PDFs when necessary
- Batch similar operations with iterators
- Monitor API credit usage regularly
- Set up alerts for high usage
Organization
- Name your modules descriptively
- Add notes to complex scenarios
- Group related modules with labels
- Use folders to organize scenarios
Make Functions Reference
Useful Make functions for PDF generation:
| Function | Description | Example |
|---|---|---|
formatDate | Format dates | {{formatDate(now; "YYYY-MM-DD")}} |
toString | Convert to string | {{toString(1.amount)}} |
replace | Replace text | {{replace(1.html; "\n"; "<br>")}} |
join | Join array items | {{join(1.items; ", ")}} |
parseNumber | Parse numbers | {{parseNumber(1.price)}} |
Related Documentation
- Quick Start - Get your API key
- HTML to PDF - Detailed endpoint documentation
- API Reference - All available endpoints
- MCP Server - AI agent integration
- n8n Integration - Alternative automation platform
- Zapier Integration - Another automation option
Credit Usage
API calls from Make scenarios use the same credit system as direct API calls:
- PDF generation: ~1 credit per page
- Text extraction: ~1 credit per page processed
- Page count: ~0.1 credits per request
Monitor your usage in the dashboard.