
PDFShift + Zapier
Generate PDF documents automatically inside your Zapier workflows with PDFShift. Convert raw HTML, dynamic Zap data, or an existing webpage into a PDF and route it anywhere Zapier connects.
Step-by-Step Setup Guide
PDFShift accepts either raw HTML or a URL and converts it into a PDF. You’ll wire it into Zapier using the API by Zapier app.
1. Get your PDFShift API key
Create a PDFShift account and retrieve your API key from the dashboard. PDFShift authenticates requests using:
Your API key should be kept private and never stored directly inside normal Zap fields.
Register for Free2. Create an API by Zapier connection
In Zapier, go to Apps → Add connection and search for API by Zapier. Choose:
For the authentication header, enter:
For the domain filter, use:
You can optionally test the connection with:
Once created, Zapier stores your PDFShift API key separately from your Zap and adds it automatically to PDFShift requests.
3. Add PDFShift to your Zap
Create or open a Zap, add an Action, and select API by Zapier, then choose:
Select the PDFShift connection you created previously.
4. Configure the PDF conversion
Set:
Then provide a JSON body such as:
{
"source": "<html><body><h1>Hello from Zapier!</h1></body></html>",
"filename": "zapier-document"
} You don’t need to add the X-API-Key header manually because Zapier adds it from your connection. When the request body is valid JSON, Zapier automatically sends it as JSON.
5. Test the PDF generation
Run the Zapier action. Because the request contains filename, PDFShift returns JSON with a URL to the generated document instead of the PDF binary, and you can use that URL in subsequent Zap steps. Your workflow might look like:
6. Use data from previous Zap steps
Your HTML can contain dynamic information from any previous Zap step. For example, if a Stripe payment triggered the Zap, your HTML could contain:
<!doctype html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
padding: 40px;
}
h1 {
margin-bottom: 30px;
}
</style>
</head>
<body>
<h1>Invoice #1234</h1>
<p>Customer: Acme Inc.</p>
<p>Total: $149.00</p>
</body>
</html>Instead of hard-coding those values, use Zapier’s field picker to insert values from previous steps:
Zapier inserts the values before sending the HTML to PDFShift, so every Zap execution generates its own personalized PDF.
7. Attach the generated PDF to an email
Many Zapier actions that accept files can use a downloadable file URL. After PDFShift generates the document, map the returned url into the attachment field of your email action:
Zapier will retrieve the document from the URL when the following action expects a file.
8. Save the PDF to cloud storage
You can also send the generated URL to storage applications such as:
A typical workflow is:
Form submitted
↓
Generate HTML
↓
PDFShift Generate PDF
↓
Google Drive: Upload PDF
↓
Gmail: Send confirmationSaving the document elsewhere is particularly useful because PDFShift’s temporary URL is automatically removed after two days.
Generate a PDF from a webpage
PDFShift can also convert an existing webpage. Instead of providing HTML, provide the page URL as source:
PDFShift loads the page and generates the PDF. This is useful when a previous Zap step provides a page URL, such as:
Customize the generated PDF
You can add any supported PDFShift parameters to the JSON body. For example:
{
"source": "<html>...</html>",
"filename": "customer-report",
"landscape": true,
"use_print": true,
"delay": 1000
}PDFShift supports options including:
- Page formats and margins
- Landscape mode
- Print CSS and custom CSS
- Headers and footers
- Custom JavaScript
- Delayed rendering
- Cookies, HTTP headers, and authentication
- Sandbox conversions and webhooks
Values can also come dynamically from previous Zap steps.
Example Workflows
Generate an invoice after a Stripe payment
A Zap could look like:
Stripe
New Payment
↓
Formatter / Template
Create invoice HTML
↓
PDFShift
Generate PDF
↓
Google Drive
Store invoice
↓
Gmail
Email invoice to customerEvery successful Stripe payment automatically generates its own PDF invoice.
Turn form responses into PDF reports
You could also create:
Typeform
New Response
↓
OpenAI
Generate report content
↓
PDFShift
Generate PDF
↓
Google Drive
Upload PDF
↓
Slack
Notify teamThis works with any Zapier trigger that provides data you can include in HTML.
PDF URLs are temporary
When filename is provided, PDFShift temporarily stores the generated document and returns a downloadable URL that is automatically deleted after two days. For permanent storage, use another Zapier action to copy the PDF into Google Drive, Dropbox, S3, or another service. If you don’t want PDFShift to store the document at all, omit filename and PDFShift returns the PDF directly.
Native PDFShift integration
For an even simpler experience, PDFShift can be used as a native Zapier integration. Users would install PDFShift, connect their API key once, and then use actions such as:
The main action could expose friendly fields such as:
- HTML or URL
- Filename
- Page format
- Landscape
- Margins
- Use print CSS
- Header
- Footer
- Delay
- Sandbox
Instead of configuring an API request, users could simply select:
and map data from previous Zap steps into the fields.