ROI Calculator
Sliders in, a payback chart out, for proposals and sales pages.
Line items that total themselves, and a button that clones the next invoice.
Exactly what Notion Arena sends to Notion, in order. Notion's data-source model forces two passes: relations, rollups and the formulas that read them need data_source_ids that only exist once the databases do.
/v1/pagesCreate the “invoice-generator” container page under the page you chose
/v1/databasesCreate the “Clients” database with 8 base properties
/v1/databases/{clients_database_id}Read back Clients to get its default data source id
/v1/data_sources/{clients_data_source_id}Add 4 deferred properties to Clients: relations (with resolved data_source_ids), then the rollups and formulas that read them
/v1/databasesCreate the “Invoices” database with 8 base properties
/v1/databases/{invoices_database_id}Read back Invoices to get its default data source id
/v1/data_sources/{invoices_data_source_id}Add 8 deferred properties to Invoices: relations (with resolved data_source_ids), then the rollups and formulas that read them
/v1/databasesCreate the “Line Items” database with 5 base properties
/v1/databases/{lineItems_database_id}Read back Line Items to get its default data source id
/v1/data_sources/{lineItems_data_source_id}Add 2 deferred properties to Line Items: relations (with resolved data_source_ids), then the rollups and formulas that read them
/v1/viewsCreate the “By status” board view on invoices
/v1/viewsCreate the “Overdue” table view on invoices
/v1/viewsCreate the “Revenue by month” chart view on invoices
/v1/viewsCreate the “Issue calendar” calendar view on invoices
/v1/viewsCreate the “Clients” table view on clients
/v1/viewsCreate the “All line items” table view on lineItems
/v1/pagesSeed 2 rows into Clients so the views are not empty on first open (one request per row; Notion has no bulk insert)
/v1/pagesSeed 2 rows into Invoices so the views are not empty on first open (one request per row; Notion has no bulk insert)
/v1/pagesSeed 2 rows into Line Items so the views are not empty on first open (one request per row; Notion has no bulk insert)
/v1/pagesCreate the “Invoice page layout” page
/v1/blocks/{invoice_page_layout_page_id}/childrenAppend 7 blocks of page body
2 steps cannot be scripted: Button: “Duplicate for next month”; Automation: mark Sent invoices Overdue.
curl -X POST https://notionarena.vercel.app/api/install \
-H 'content-type: application/json' \
-d '{
"component": "invoice-generator",
"mode": "plan"
}'
# add "token" and "parentPageId" and switch to "mode": "api" to install for realThe real property schemas, not a description of them. Every formula below is a Notion Formula 2.0 expression you can paste into a property by hand if you would rather not use the API at all.
ref: clientsn/an/an/an/an/apercentUSD · EUR · GBP · PKRnumber→ invoices (two-way)sum(Invoices.Grand total)sum(Paid invoices.Grand total)prop("Total invoiced") - prop("Total paid")ref: invoicesn/aprefix INVDraft → Sent → Overdue → Paid +1→ clientsn/an/an/a→ lineItems (two-way)sum(LineItems.Line total)show_original(Client.Tax rate)prop("Subtotal") * prop("Tax rate")prop("Subtotal") + prop("Tax")if(prop("Status") == "Paid", 0, max(0, dateBetween(now(), prop("Due date"), "days")))ifs(prop("Status") == "Paid", "", prop("Days overdue") > 14, "🔴 " + format(prop("Days overdue")) + "d overdue", prop("Days overdue") > 0, "🟡 " + format(prop("Days overdue")) + "d overdue", true, "🟢 Current")n/an/aref: lineItemsn/an/anumberdollar→ invoicesprop("Quantity") * prop("Unit price")numberCreated through POST /v1/views, which shipped in March 2026 and is the reason provisioning a workspace from code finally works end to end.
on invoices
on invoices
filter: {"property":"Overdue flag","string":{"contains":"overdue"}}…
on invoices
on invoices
on clients
on lineItems
Appended with real block types (headings, toggles, callouts, to-dos, column lists) in chunks of 100, the Append block children limit.
Put this in the Invoices page body template. Column layouts survive export to PDF, which a table alone does not.
Your business name
Address line
Tax ID
Invoice no.
Issued
Due
Terms
Embed the Line Items database here as a linked view, filtered to this invoice, showing Name, Quantity, Unit price and Line total.
Payment instructions, bank details, and a thank-you line.
Subtotal
Tax
Total due
Every recipe ships with its manual steps written out, because pretending the API covers everything is how people end up with a half-built workspace. These are real Notion limitations, quoted from the API reference.
Button properties are response-only in the Notion API: the schema is returned on read, but the API ignores button settings on write and cannot create a button or configure its actions.
Database automations have no public API surface. They are configured per-database in the Notion app under ••• → Automations.
An Invoices database with a Line Items child database, rollups for subtotal, a formula for tax and total, and a page body template that renders the invoice as a printable layout. A button duplicates last month's invoice with fresh dates.
Sliders in, a payback chart out, for proposals and sales pages.
Compare monthly income against four editable expense buckets.
Adjust a small item list with plus and minus stock controls.