How to Take Screenshots and Generate PDFs in n8n Workflows Using PageBolt API
You're building automation workflows in n8n. Your workflow monitors competitor prices, tracks design changes, generates reports, or creates audit trails. You need screenshots or PDFs — but running Puppeteer in an n8n execution breaks your workflow (300MB+ memory, 5–10 second startup per execution).
PageBolt's REST API solves this. One HTTP Request node. One API key. Screenshots and PDFs on demand, inside your workflow.
Setup: Get Your API Key
- Go to pagebolt.dev/pricing
- Sign up (free tier: 100 requests/month, no card)
- Copy your API key from the dashboard
- In n8n, create a new Credential of type "Header Auth"
-
Name:
PageBolt API -
Header:
Authorization -
Value:
Bearer YOUR_API_KEY
-
Name:
Done. Your n8n instance can now call PageBolt.
Node 1: HTTP Request — Take a Screenshot
Add an HTTP Request node to your workflow:
Configuration:
- Method: POST
-
URL:
https://api.pagebolt.dev/v1/screenshot - Authentication: Select "PageBolt API" (your credential from above)
- Send Body: Raw
- Body:
{
"url": "{{ $json.targetUrl }}",
"options": {
"format": "png",
"width": 1280,
"height": 720,
"full_page": false
}
}
Input (from previous node):
{
"targetUrl": "https://example.com"
}
Output:
{
"url": "https://example.com",
"format": "png",
"width": 1280,
"height": 720,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"screenshot_time_ms": 847
}
The image field is base64-encoded PNG. Save it to a file or send to storage:
{
"filename": "screenshot-{{ $json.url.replace(/[^a-z0-9]/gi, '-').toLowerCase() }}.png",
"data": "{{ $json.image }}"
}
Node 2: HTTP Request — Generate a PDF
Add another HTTP Request node for PDFs:
Configuration:
- Method: POST
-
URL:
https://api.pagebolt.dev/v1/pdf - Authentication: "PageBolt API"
- Body:
{
"url": "{{ $json.targetUrl }}",
"options": {
"format": "A4",
"margin": "1cm",
"print_background": true
}
}
Output:
{
"url": "https://example.com",
"format": "A4",
"pdf": "data:application/pdf;base64,JVBERi0xLjQKJeLj...",
"pdf_size_bytes": 142356,
"generation_time_ms": 2104
}
Same pattern — pdf field is base64-encoded.
Real Workflow Example: Daily Competitor Screenshot Report
Monitor 10 competitor sites daily. Take screenshots. Generate a PDF report.
Workflow:
- Trigger: Cron (every day at 9 AM)
- Loop: Iterate over competitor URLs
- Screenshot Node: Call PageBolt /screenshot for each URL
- Collect: Gather all screenshots
- PDF Report Node: Generate single PDF with all screenshots embedded
- Send Email: Email PDF to team
Nodes:
Cron Trigger
↓
Set URLs (competitor list)
↓
For Each URL
├→ HTTP Request: Screenshot
├→ Save to Object Storage (AWS S3, etc.)
└→ Collect metadata
↓
Merge all data
↓
HTTP Request: Generate PDF with embedded images
↓
Send Email (Gmail node) with PDF attachment
↓
Log completion
Key Options
Screenshot Options
-
format:
png,jpeg,webp - width/height: Viewport size (e.g., 1280x720, 1920x1080)
-
full_page:
trueto capture entire scrollable page - wait_for_selector: Wait for specific element before capturing
-
block_ads:
trueto remove ads -
block_banners:
trueto hide cookie banners
PDF Options
-
format:
A4,Letter,Legal,A3,A5 -
margin: CSS value like
"1cm"or"0.5in" -
landscape:
truefor landscape orientation -
print_background:
trueto include CSS backgrounds
Error Handling
Add a Try/Catch block around your HTTP nodes:
HTTP Request: Screenshot
├→ (if success) Continue to next step
└→ (if error) Catch node
├→ Log error: "Screenshot failed: {{ $json.message }}"
└→ Send notification
n8n's error handling ensures failed API calls don't break your workflow.
Pricing & Limits
- Free tier: 100 requests/month
- Starter: $29/month → 10,000/month
- Scale: $99/month → 100,000/month
At 10 competitors × daily screenshot = 300/month, you're well within free tier.
Next Steps
- Create the PageBolt API credential in n8n
- Add HTTP Request node to a test workflow
- Test with a single URL
- Build your multi-step workflow
- Deploy and automate
No Puppeteer management. No memory leaks. No on-call incidents. Just REST.
Try it free: 100 requests/month, no credit card.
Learn more: pagebolt.dev/docs — full API reference for all options.
Top comments (0)