RenderInvoice runs entirely in your browser. If you need batch PDF generation, deploy the worker to your own Cloudflare account. If you want a spreadsheet workflow, use the Google Sheets script without setting up an external API.
hithismani/render-invoicecf-worker/: Cloudflare WorkerA minimal Cloudflare Worker you can deploy to your Cloudflare account. Send a POST /v1/render request with { "invoice": {…} } (or a bare invoice object) to receive PDF or PNG bytes. Two render engines are supported:
?engine=browser): Uses Cloudflare Browser Rendering to print the public /print-view page in headless Chromium. Takes 500 to 2000 ms per request to generate a vector PDF with selectable text.?format=pdf|png (satori). Browser engine is always PDF. No SVG.wrangler secret put API_KEY_SECRET).?engine=browser. Satori runs on the free tier.curl -X POST \ https://your.workers.dev/v1/render \ -H 'Content-Type: application/json' \ --data-binary @invoice.json \ --output invoice.pdf
A single HYPERLINK formula creates a pre-filled playground URL from a spreadsheet row. Opening the link loads every field into the playground without API calls.
I want to turn a Google Sheet into a one-click invoice generator using RenderInvoice (https://renderinvoice.com, a browser-only invoice tool with no backend).
The integration is pure link-building. An Apps Script reads the active row, builds an RenderInvoice invoice JSON object, and constructs a URL like:
https://renderinvoice.com/playground#j=<encodeURIComponent(JSON.stringify(invoice))>
Opening that URL pre-fills every field in the playground. From there I (or my client) review and download a vector PDF. No API calls, no auth, no Cloudflare Worker, and no Drive integration.
Please:
1. Propose a Google Sheet column layout that matches my business (described below). Keep one row per invoice. Include columns for: From block, Bill To block, invoice meta (number, date, due, project), line items (description / qty / rate / amount up to N rows), summary rows (subtotal, tax, total), and design settings (accentColor hex, design = "classic" or "bold").
2. Write a complete Apps Script (Code.gs) with: buildInvoice(row), shareUrlFor(invoice), openActiveRow() that pops a modal that calls window.open(url), and onOpen() that adds an "RenderInvoice" menu.
3. Make the script defensive about empty cells and stop reading line items at the first blank row.
Before writing code, please READ these reference docs so the JSON shape and URL format are correct:
- Plain-language schema and share-URL spec for AI agents: https://renderinvoice.com/llms.txt
- Developer page (schema reference, examples): https://renderinvoice.com/developers
- Live invoice examples to model after: https://renderinvoice.com/examples
Constraints from the schema:
- Every key used in lineItems[] rows must also appear in columns[].
- summary[].value is a string or number that I compute in the sheet; RenderInvoice never calculates totals, formats currency, or applies tax.
- Pre-fill design ("classic" or "bold") and accentColor (#RRGGBB).
My business: <describe your invoicing, e.g., "UK design freelancer billing hourly + 20% VAT", "SaaS with monthly seats and proration", "agency with retainers and split shipping addresses">.
My existing sheet (if any): <paste a header row, or describe the columns you already have, or leave blank to start from your suggestion>.
=HYPERLINK(
"https://renderinvoice.com/playground#j="
& ENCODEURL(G2),
"Open ↗"
)
# G2 holds the JSON for that row,
# built with & concatenation
# from your other columns.Encoding invoice JSON into the URL hash loads the invoice with no server. Point the hash at /playground to edit, or /print-view to print.
compressToEncodedURIComponent for shorter URLs.encodeURIComponent(JSON.stringify(invoice)). Generates longer URLs that can be constructed from shell scripts, Apps Script, or curl./llms.txtFollows the llms.txt convention. Automated agents can read this file to understand the schema and worker configuration.
Read /llms.txtEvery field accepted by the JSON editor and render worker. Zod defines the schema in the codebase; this is the rendered documentation view.
"classic"Visual variant for the rendered invoice. "classic" is the default; "bold" uses an accent header.
Google Font family name for the invoice (default Inter). Same face is used in the playground, PDF, and worker.
"#2563eb"Accent color (hex) threaded through headings, totals, and borders.
"center"Where the logo sits in the header.
"ltr"Reading direction. Use "rtl" for Arabic, Hebrew, Urdu, Farsi, and other right-to-left scripts.
trueWhether to automatically fit the content to the page when generating PDF.
The filename to use for the generated PDF.
The main heading or title for the invoice (e.g., "Invoice").
A brief description or subtitle for the invoice.
Sender details as dynamic key-value pairs.
Recipients as array of dynamic key-value pair objects.
Metadata displayed before line items.
{}Metadata displayed after line items.
Column headers for the line items table.
Line item data aligned with columns.
Invoice summary items.
Label for a summary item.
Value for the summary item.
Company logo URL or embedded data URL.
Logo dimensions.
Digital signature image URL or embedded data URL.
Signature dimensions.
Footer text.
falseIf false, a disclaimer about verifying amounts will be displayed.
falseIf true, shows a small "Built with RenderInvoice" line at the bottom of the invoice.
If true (default), add a full-width footer rule that links back to this invoice in the playground (PDF only).