RenderInvoice runs entirely in your browser. For programmatic PDFs, self-host the free Cloudflare Worker. If you want a spreadsheet workflow, use the Google Sheets script without setting up an external API.
hithismani/render-invoiceSend a POST /v1/render request with { "invoice": {…} } (or a bare invoice object). Same template as the playground. You get a PDF with selectable text. Cloudflare free plan.
npx wrangler deploy from the repo root.npx wrangler secret put API_KEY_SECRET (required).ALLOWED_IPS=1.2.3.4,5.6.7.8.POST /v1/render withAuthorization: Bearer <API_KEY_SECRET>.curl -X POST \ https://your-worker.workers.dev/v1/render \ -H 'Authorization: Bearer $API_KEY_SECRET' \ -H 'Content-Type: application/json' \ --data-binary @invoice.json \ --output invoice.pdf
RenderInvoice, the playground, and the Cloudflare Worker are provided without warranties or guarantees of any kind, including merchantability, fitness for a particular purpose, accuracy of rendered output, uptime, or continued free-tier availability.
You are responsible for verifying invoice totals, tax, legal fields, and recipient details before sending documents. Hosted free tiers may sleep, throttle, change pricing, or terminate services. Self-hosted deployments are your responsibility for security, secrets, IPs, and scaling.
Use of the software is at your own risk. See Terms of service and Privacy policy.
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 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
- API 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).
- Every text field accepts markdown: **bold** *italic* ~~strike~~ `code` [label](url), #–####### headings, {@18} / {@p:18} absolute size, {@18:span} inline size, - lists, 1. numbered, > quotes. Single newlines are kept. Wrap a key in @Label@ to hide it (from/to/meta). Currency glyphs (₹ € £ ¥) are fine as plain text.
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./llms.txtFollows the llms.txt convention. Automated agents can read this file to understand the schema and worker configuration.
Read /llms.txtMarkdown in every text field (invoiceHeading, invoiceDescription, invoiceFrom keys & values, invoiceTo keys & values, metaTop / metaBottom keys & values, columns, line-item cells, summary labels & values, footerText, cancelledNotes). Inline: **bold** *italic* ***bold italic*** ~~strike~~ `code` [label](url) {@18:inline size}. Blocks: # … ####### headings {@18} / {@p:18} line size - list 1. numbered > quote ---. Size: #–####### scale from the field base size; {@18} / {@p:18} set absolute px for a line; {@18:span} sizes an inline run. Keys: wrap a key in @…@ (e.g. "@note@") to hide the label and print the value only. Line breaks: a single newline is kept (no need for a blank line). Currency/punctuation glyphs (₹ € £ ¥ ₩ ₽ • — – … → ← ·) render via the invoice font + Inter fallback. Not supported: tables, images, raw HTML, footnotes, task lists.
| Tag | Meaning |
|---|---|
| **text** or __text__ | inlineBold |
| *text* or _text_ | inlineItalic |
| ***text*** | inlineBold + italic |
| ~~text~~ | inlineStrikethrough |
| `code` | inlineInline code (monospace chip) |
| [label](https://…) | inlineLink (blue, underlined; clickable in PDF) |
| user@host (bare email) | inlineAutolinked mailto in PDF |
| # heading … ####### heading | sizeH1–H7 - scale from the field’s base size, bold |
| {@18} rest of line | sizeAbsolute font size in px for the rest of that line |
| {@p:18} rest of line | sizeSame as {@18} (paragraph-size alias) |
| {@18:span text} | sizeInline run at absolute px size |
| - item or * item | blockUnordered list |
| 1. item | blockOrdered list |
| > quote | blockBlockquote |
| --- | blockHorizontal rule |
| single newline | blockHard line break (kept; no blank line required) |
| @Label@ (full key) | keysHide the key label; print the value only (from / to / meta) |
| spaces around @…@ | keysTrimmed first - " @note@ " still hides the label |
Not supported: tables, images, raw HTML, footnotes, task lists.
Every field accepted by the JSON editor and render worker. Text fields accept the markdown tags above.
"classic"Visual variant for the rendered invoice. "classic" is the default; "bold" uses an accent header.
Typeface for playground, PDF, and worker. One of: Inter, Source Serif 4, IBM Plex Sans, Playfair Display, Space Grotesk, DM Sans, Fraunces, Libre Baskerville, Instrument Sans, Newsreader. Default Inter. Unknown names fall back to Inter.
"#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.
truePDF page sizing. true (default): portrait A4 width, height = max(A4, content). false: scale the whole invoice onto one A4 page.
The filename to use for the generated PDF.
The main heading or title for the invoice (e.g., "Invoice").
Subtitle. Full markdown: **bold** *italic* ~~strike~~ `code` [label](url) #–####### headings {@18}/ {@p:18} size {@18:span} - list 1. numbered > quote. Line breaks kept.
Sender key-value pairs. Keys and values accept full markdown including size overrides ({@18}, # headings). Wrap a key in @…@ (e.g. "@note@") to hide the label and print the value only.
Recipients as key-value objects. Keys and values accept full markdown including size overrides. Wrap a key in @…@ to hide the label.
Metadata above line items. Keys and values accept full markdown including size overrides. Wrap a key in @…@ to hide the label.
{}Metadata below line items. Keys and values accept full markdown including size overrides. Wrap a key in @…@ to hide the label.
Column headers for the line items table. Markdown supported.
Line item cells aligned with columns. Full markdown including currency glyphs (₹ € £) and size overrides.
Invoice summary items.
Label for a summary item. Markdown supported.
Value for the summary item. Markdown and currency glyphs supported.
Company logo URL or embedded data URL.
Logo dimensions.
Digital signature image URL or embedded data URL.
Signature dimensions.
Footer text. Full markdown (bold/italic/code/links/headings/lists/quotes), single newlines kept, size overrides {@18} / #–#######.
Notes shown when the invoice is cancelled. Same markdown as the description.
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).