Scrapers / Developer & File Tools

Template Document Generator
hipersoft/template-document-generator
Merge your data into a Handlebars template and get back a document — PDF, HTML or plain text. Generate invoices, reports, receipts, certificates and contracts in bulk from an n8n, Make or Zapier workflow.
Total users
2Monthly users
1Total runs
77Per document generated
$0.005Last rebuilt
Oct 26, 2026Overview
Merge your data into a Handlebars template and get a finished document back — a PDF, an HTML file or plain text. Perfect for invoices, reports, receipts, certificates and contracts, one at a time or in bulk.
What it does
- Fills a Handlebars/HTML template with your data and produces a document.
- Outputs PDF, HTML or plain text — you choose the format.
- Handles one document (pass
data) or a whole batch (passrows— one document per row, a mail-merge). - Saves every document to storage and returns a direct link to each file.
Use cases
- Invoices & receipts — turn each order into a branded PDF invoice.
- Reports — merge metrics into a styled report on a schedule.
- Certificates & contracts — generate personalized certificates or agreements for a list of people.
- Bulk mail-merge — feed an array of rows and get one document per row in a single run.
- The document step in your workflow — drop it into n8n, Make or Zapier: pass your row data, get a PDF back to email, upload or archive downstream.
Input
{
"template": "<h1>Invoice {{number}}</h1><p>Billed to: {{customer}}</p><p>Total: {{total}}</p>",
"rows": [
{ "number": "INV-001", "customer": "Acme", "total": "$42.00" },
{ "number": "INV-002", "customer": "Globex", "total": "$99.00" }
],
"output": "pdf"
}
| Field | Type | Description |
|---|---|---|
template |
string | The Handlebars/HTML template with {{placeholders}}. |
templateUrl |
string | Fetch the template from a URL (used when template is empty). |
data |
object | Field values for a single document. |
rows |
array | Array of objects — one document per row (batch / mail-merge). |
output |
string | pdf, html or txt (default pdf). |
pdfFormat |
string | Paper size for PDF: A4, Letter, Legal… |
landscape |
boolean | Landscape orientation for PDF. |
filePrefix |
string | Prefix for generated file names. |
Output
{ "index": 0, "format": "pdf", "bytes": 48213, "resultUrl": "https://api.apify.com/v2/key-value-stores/.../records/doc-0001.pdf", "ok": true }
Output schema
| Field | Type | Description |
|---|---|---|
index |
integer | Position of the row in your input. |
format |
string | Format of the produced document. |
bytes |
integer | Size of the generated file. |
resultUrl |
string (URL) | Direct link to the document. |
ok |
boolean | Whether the document was generated. |
FAQ
Can I generate one PDF per row? Yes — pass an array in rows and you get one document per row in a single run.
Which template syntax is supported? Handlebars — {{field}} placeholders, {{#each}}, {{#if}} and common helpers.
Can I use it in n8n? Yes — run it from the Apify node in your workflow, or via integrations and the Apify API.
Notes
Original clean-room implementation.
Input
| Field | Type | Description |
|---|---|---|
templateTemplate | string | The document template, written in Handlebars/HTML. Use {{placeholders}} for your data fields, e.g. Invoice {{number}}Total: {{total}}. Leave empty if you provide a Template URL instead. |
templateUrlTemplate URL | string | A URL to fetch the template from (used when Template is empty). Point it at a hosted Handlebars/HTML template file. |
dataData (single document) | object | An object of field values to merge into the template. Produces one document. Example: { "number": "INV-001", "customer": "Acme", "total": "$42.00" }. |
rowsRows (batch / mail-merge) | array | An array of objects — one document is produced per row (a mail-merge, e.g. a batch of invoices). When provided, this is used instead of Data. |
outputOutput format | string · pdf, html, txt | The file format for each generated document. Default: "pdf" |
pdfFormatPDF page size | string · A4, A3, A5, Letter, Legal, Tabloid | Paper size for PDF output. Default: "A4" |
landscapeLandscape (PDF) | boolean | Use landscape orientation for PDF output. Default: false |
filePrefixFile name prefix | string | Prefix for the generated file names, e.g. "invoice" → invoice-0001.pdf. Default: "doc" |
API
curl -X POST "https://api.apify.com/v2/acts/hipersoft~template-document-generator/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"template": "<h1>Invoice {{number}}</h1>\n<p>Billed to: {{customer}}</p>\n<p>Total: {{total}}</p>"
}'from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("hipersoft/template-document-generator").call(run_input={
"template": "<h1>Invoice {{number}}</h1>\n<p>Billed to: {{customer}}</p>\n<p>Total: {{total}}</p>"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('hipersoft/template-document-generator').call({
"template": "<h1>Invoice {{number}}</h1>\n<p>Billed to: {{customer}}</p>\n<p>Total: {{total}}</p>"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);Pricing
| Event | Price | Paid plans from |
|---|---|---|
| Document Generated Charged per document rendered from a template. | $0.005 | $0.0025 |
You pay only for what the run returns. Set a maximum cost per run and it stops cleanly at that limit.
Related scrapers
Bulk Image Downloader
Download thousands of images from a list of URLs and store each in the key-value store with a public link. Returns content type, size, dimensions and SHA-256 per image. Bulk-ready. Great for datasets, backups and media pipelines.
8,102 runs · 103 users · $0.056 / url processedText to Speech
Convert any text to natural-sounding speech as an MP3 download. 300+ premium neural voices across 70+ languages, adjustable rate, pitch and volume. Great for voiceovers, videos, accessibility and audio content. No setup.
278 runs · 22 users · $0.01 / audio generatedGoogle Maps Email Extractor
Search Google Maps for businesses, then crawl each business website to extract emails, social profiles and extra phone numbers. Turns any Maps search into a ready lead list. No setup.
159 runs · 8 users · $0.006 / business lead scrapedWebsite Screenshot
Capture full-page or viewport screenshots of any URL as PNG or JPEG, at any device size. For monitoring, previews, thumbnails and automation workflows.
156 runs · 3 users · $0.004 / screenshot capturedBulk URL Status Checker
Check thousands of URLs over plain HTTP: status codes, broken links (404/410/5xx), full redirect chains, response time, content type, page title and SSL certificate expiry.
154 runs · 13 users · $0.002 / url checkedGoogle Search Scraper
Scrape Google Search results (organic listings) for any query: title, URL, displayed URL, snippet and position. Multi-query, per-country/language, pagination. Uses Google SERP proxy — reliable, no captcha, no setup.
121 runs · 8 users · $0.001 / result scrapedSend the site and the fields. We build it and you get it first.