Scan & Track Tax Receipt Tool (New Zealand)
Reads a receipt photo or PDF on this Mac, pulls out vendor, date, total and GST, picks an NZ IRD expense category, and saves it to the receipts table.
How it works
You provide
Osaurus asks for these each time it runs.
- ReceiptFile
The receipt photo or PDF: attach it in chat, pick a file, or type a file name from your Receipts folder.
- NoteOptional
Optional: what it was for, e.g. 'client lunch with Acme' or 'home office chair'.
What happens
- Step 1: Find the fileRuns code
- Step 2: Copy receipt inUses file copy
- Step 3: Read receipt (OCR)Uses detect text
Pull text from the photo or PDF (OCR on this Mac).
- Step 4: Tidy textRuns code
- Step 5: Extract & categoriseAI step
Local model finds vendor, date, totals, GST and IRD category.
- Step 6: Check GST & build recordRuns code
Make a stable ID and tidy the row.
- Step 7: Save to receipts tableSaves data
Store in the workflow's receipts table.
You get
What it hands back when it's done.
- GSTNumber
- Date
- Total (incl. GST)Number
- Vendor
- Summary
- IRD category
- GST check detail
- GST checkA choice
- Receipt ID
- Needs reviewYes or no
- Deductible %Number
What it can access
- Internet
- Doesn't connect to the internet
- Files
- Reads the file you choose (Receipt)
- Saves files on your computer (worth a look)
- Code and commands
- Runs JavaScript in a sandbox
- Accounts and keys
- Needs the osaurus.vision plugin (worth a look)
- Other
- Reads text in images
Generated by the Store from the shared file. Review access again in Osaurus before adding. How listings are checked
See access in detailSteps
Every step in the order it runs. Select one in the graph for a quick look; the full details, including any code, follow below it.
No network access. · Times out after 30s
Show code · 13 linesHide code
async function run(input, ctx) { let p = String(input.file || '').trim(); if (!p) throw new Error('No receipt file was given.'); if (p.startsWith('file://')) p = decodeURIComponent(p.slice(7)); const absolute = p.startsWith('/') || p.startsWith('~'); if (!absolute) { if (!input.folder) throw new Error('"' + p + '" is a file name, but no Receipts folder is set up. Pass the full file or set the folder in Set Up.'); p = String(input.folder).replace(/\/$/, '') + '/' + p; } const m = /\.([A-Za-z0-9]+)$/.exec(p); const ext = m ? m[1].toLowerCase() : 'jpg'; return { source: p, copy_name: 'receipt-' + String(ctx.run.id).slice(0, 8) + '.' + ext }; }Show data passed inHide data passed in
{ "file": "{{input.receipt}}", "folder": "{{folders.receipts}}" }Show data passed inHide data passed in
{ "source": "{{nodes.resolve.output.source}}", "destination": "{{nodes.resolve.output.copy_name}}" }Pull text from the photo or PDF (OCR on this Mac).
Show data passed inHide data passed in
{ "image_path": "{{nodes.resolve.output.copy_name}}", "recognition_level": "accurate" }No network access. · Times out after 30s
Show code · 15 linesHide code
async function run(input, ctx) { const o = input.o; if (typeof o === 'string') return { text: o, blocks: o ? o.split('\n').length : 0 }; const blocks = []; const walk = v => { if (Array.isArray(v)) v.forEach(walk); else if (v && typeof v === 'object') { if (typeof v.text === 'string' && !Array.isArray(v.blocks)) blocks.push(v.text); else Object.values(v).forEach(walk); } }; walk(o); ctx.log('OCR shape sample: ' + JSON.stringify(o).slice(0, 600)); return { text: blocks.join('\n'), blocks: blocks.length }; }Show data passed inHide data passed in
{ "o": "{{nodes.read.output}}" }Local model finds vendor, date, totals, GST and IRD category.
Show the instructions · 16 linesHide the instructions
You read OCR text from a New Zealand receipt or tax invoice and return structured expense data for an NZ IRD tax return. OCR reading order is approximate: a label and its amount may be on different lines. Rules: - vendor: the business that issued the receipt. - date: the transaction date as YYYY-MM-DD (NZ receipts use day/month/year). Empty string if not found. - total: the final amount paid including GST, as a number in NZD. - gst: the GST amount printed on the receipt if you can see one (OCR may misspell GST as 'GSI' or 'G5T'); otherwise 0. Do not calculate it; a later step checks GST. - gst_number: the vendor's GST number if printed (like 44-833-938), else empty string. - currency: 3-letter code, usually NZD. - category: the best NZ IRD business expense category from the allowed list. Use the person's note as a strong hint about purpose. 'Entertainment' for meals, drinks and hospitality with clients/staff; 'Low-value asset' for equipment under $1,000 excl. GST; 'Depreciable asset' for equipment $1,000 or more excl. GST; 'Personal (not deductible)' for clearly private purchases. - deductible_percent: 100 normally; 50 for Entertainment; 0 for Personal; for Home office, Motor vehicle or Phone & internet use 100 unless the note gives a business-use share. - line_items: short descriptions of the main items bought (at most 8). - confidence: high, medium or low depending on how legible and complete the receipt is. - notes: one short sentence explaining the category choice or anything missing. If the text is empty or is not a receipt, return vendor 'Unknown vendor', total 0, gst 0, category 'Other business expense', confidence 'low', and say so in notes.
Show data passed inHide data passed in
{ "note": "{{input.note}}", "receipt_text": "{{nodes.ocr_text.output.text}}" }Make a stable ID and tidy the row.
No network access. · Times out after 30s
Show code · 66 linesHide code
async function run(input, ctx) { const e = input.e || {}; const text = String(input.text || ''); const lines = text.split(/\r?\n/); const r2 = n => Math.round((Number(n) || 0) * 100) / 100; const near = (a, b, tol) => Math.abs(a - b) <= (tol == null ? 0.02 : tol); const amounts = s => { const out = []; const re = /(\d{1,3}(?:,\d{3})+|\d+)\.(\d{2})(?!\d)/g; let m; while ((m = re.exec(s))) out.push(r2(m[1].replace(/,/g, '') + '.' + m[2])); return out; }; const all = amounts(text); const total = r2(e.total); const pct = Math.max(0, Math.min(100, Number(e.deductible_percent) || 0)); const vendor = (e.vendor || 'Unknown vendor').trim(); const date = (e.date || '').trim(); const checks = []; let needs_review = false; const gstWord = /\bG\s?[S5]\s?[TIl1]\b/i; let gst_number = (e.gst_number || '').trim(); if (!gst_number) { const m = /\bG\s?[S5]\s?[TIl1]\b[^\d\n]{0,20}(\d{2,3}[- ]?\d{3}[- ]?\d{3})/i.exec(text); if (m) gst_number = m[1]; } const isNumberLine = l => /\d{2,3}[- ]\d{3}[- ]\d{3}/.test(l); const gstLines = []; lines.forEach((l, i) => { if (gstWord.test(l) && !isNumberLine(l)) gstLines.push(i); }); const inclStated = gstLines.some(i => /incl|includ|inclusive/i.test(lines[i])); const taxInvoice = /tax\s*invoice/i.test(text); const declared = inclStated || !!gst_number || taxInvoice || gstLines.length > 0; const expected = r2(total * 3 / 23); const sameLine = [], adjacent = []; gstLines.forEach(i => { amounts(lines[i]).forEach(a => { if (a > 0 && a < total) sameLine.push(a); }); [i - 1, i + 1].forEach(j => { if (lines[j] != null) amounts(lines[j]).forEach(a => { if (a > 0 && a < total) adjacent.push(a); }); }); }); let gst = 0, gst_status; const nearGst = sameLine.concat(adjacent).find(a => near(a, expected)); const anywhere = all.find(a => near(a, expected) && !near(a, total, 0.005)); const statedOther = sameLine.find(a => a <= expected + 0.02); if (total <= 0) { gst_status = 'no_total'; needs_review = true; checks.push('Could not read a total, so GST could not be checked.'); } else if (declared && nearGst != null) { gst = nearGst; gst_status = 'verified'; checks.push(`GST $${gst.toFixed(2)} is stated on the receipt and matches 15% of $${total.toFixed(2)}.`); } else if (statedOther != null) { gst = statedOther; gst_status = 'stated_differs'; needs_review = true; checks.push(`Receipt states GST $${gst.toFixed(2)}, but 15% of the total would be $${expected.toFixed(2)}; some items may be GST-free. Used the stated figure.`); } else if (declared && anywhere != null) { gst = anywhere; gst_status = 'found_on_receipt'; checks.push(`GST is declared and $${gst.toFixed(2)} (15% of the total) appears on the receipt, though not on a labelled GST line.`); } else if (declared) { gst = expected; gst_status = 'calculated_not_found'; needs_review = true; checks.push(`Receipt declares GST${gst_number ? ' (GST No. ' + gst_number + ')' : ''} but $${expected.toFixed(2)} was not found on it; filled in at 15%. Check the receipt.`); } else { gst = 0; gst_status = 'not_declared'; needs_review = true; checks.push('No GST statement or GST number found on the receipt; recorded with no GST. Check the receipt.'); } if (total > 0 && !all.some(a => near(a, total, 0.005))) { needs_review = true; checks.push(`The total $${total.toFixed(2)} does not appear in the receipt text.`); } if (!date) { needs_review = true; checks.push('No date found.'); } if (e.confidence === 'low') needs_review = true; const gst_check = checks.join(' '); const raw = [date, vendor.toLowerCase(), total.toFixed(2)].join('|'); let h = 2166136261; for (let i = 0; i < raw.length; i++) { h ^= raw.charCodeAt(i); h = Math.imul(h, 16777619); } const id = (date || 'nodate') + '-' + (h >>> 0).toString(16).padStart(8, '0'); const excl = r2(total - gst); const tax_year = (() => { const m = /^(\d{4})-(\d{2})/.exec(date); if (!m) return ''; const y = +m[1], mo = +m[2]; const end = mo >= 4 ? y + 1 : y; return (end - 1) + '-' + String(end).slice(2); })(); const record = { id, vendor, date, tax_year, total, gst, gst_status, gst_check, needs_review, total_excl_gst: excl, gst_number, currency: e.currency || 'NZD', category: e.category, deductible_percent: pct, claimable_excl_gst: r2(excl * pct / 100), claimable_gst: r2(gst * pct / 100), line_items: e.line_items || [], note: input.note || '', confidence: e.confidence, model_notes: e.notes || '', source_file: input.file || '', submitted_at: new Date().toISOString() }; const summary = `${vendor} ${date || '(no date)'} $${total.toFixed(2)} incl. GST $${gst.toFixed(2)} [${gst_status}] → ${e.category} (${pct}% deductible, tax year ${tax_year || '?'})${needs_review ? ' — NEEDS REVIEW: ' + gst_check : ''}`; return { id, record, summary }; }Show data passed inHide data passed in
{ "e": "{{nodes.extract.output}}", "file": "{{nodes.resolve.output.source}}", "note": "{{input.note}}", "text": "{{nodes.ocr_text.output.text}}" }Store in the workflow's receipts table.
- Saves
receipts → {{nodes.record.output.id}}- Value
{{nodes.record.output.record}}
Inputs and outputs
The receipt photo or PDF: attach it in chat, pick a file, or type a file name from your Receipts folder.
Optional: what it was for, e.g. 'client lunch with Acme' or 'home office chair'.
Returns
gst
date
total
vendor
summary
category
gst_check
One of: verified, found_on_receipt, stated_differs, calculated_not_found, not_declared, no_total
receipt_id
needs_review
deductible_percent
Sample inputs
Included in the file by the author.
Stationery receipt
{
"note": "printer paper and ink for the home office",
"receipt": "countdown_receipt.jpg"
}Woolworths company lunch
{
"note": "groceries for company lunch",
"receipt": "~/Downloads/IMG_2347.HEIC"
}Access in detail
Read from the steps, not only from what the author declared.
Author
Signed by author. The signature matches the publisher's key. It does not guarantee that the listing is safe. Only the same key can publish new versions of this workflow.
- Author
- kris
- Key
0x425E78375336d1938cf0eaE5c40aa86CbE1C2eBB- First published
- Oct 15, 2026
File
The exact file Osaurus imports. Its hash and signature were checked on upload.
- Version
- 3
- Hash
sha256:301252bc98c4a1a067b0f6a6b3b65c30b3230b95c3fa411b65a2b31f24875a5d- Size
- 20.3 KB
- Signature
- Matches the author's key
Show the JSONHide the JSON
{
"id": "E5098C5C-294E-4966-B861-B72B70F948A5",
"kind": "workflow",
"name": "Scan & Track Tax Receipt Tool (New Zealand)",
"author": {
"address": "0x425E78375336d1938cf0eaE5c40aa86CbE1C2eBB",
"signature": "9e6ba7318f5ef87dfbbf262772a66a7678969fe64f4ad552144129658b15487765ad607dec02800a1278a7d6e9582d2ecb24397db3bce0cab8da9a1bfa84e8f61c"
},
"format": "osaurus.template",
"summary": "Reads a receipt photo or PDF on this Mac, pulls out vendor, date, total and GST, picks an NZ IRD expense category, and saves it to the receipts table.",
"version": 3,
"workflow": {
"edges": [
{
"to": "record",
"from": "extract"
},
{
"to": "save",
"from": "record"
},
{
"to": "copy",
"from": "resolve"
},
{
"to": "read",
"from": "copy"
},
{
"to": "ocr_text",
"from": "read"
},
{
"to": "extract",
"from": "ocr_text"
}
],
"nodes": [
{
"id": "read",
"kind": "tool",
"name": "Read receipt (OCR)",
"tool": {
"name": "detect_text",
"plugin": "osaurus.vision"
},
"input": {
"image_path": "{{nodes.resolve.output.copy_name}}",
"recognition_level": "accurate"
},
"retry": {
"max_attempts": 2,
"backoff_seconds": 2
},
"intent": "Pull text from the photo or PDF (OCR on this Mac).",
"timeout": 120,
"output_schema": {}
},
{
"id": "extract",
"kind": "inference",
"name": "Extract & categorise",
"input": {
"note": "{{input.note}}",
"receipt_text": "{{nodes.ocr_text.output.text}}"
},
"retry": {
"max_attempts": 2,
"backoff_seconds": 3
},
"intent": "Local model finds vendor, date, totals, GST and IRD category.",
"timeout": 400,
"inference": {
"mode": "generate",
"model_slot": "extractor",
"temperature": 0,
"instructions": "You read OCR text from a New Zealand receipt or tax invoice and return structured expense data for an NZ IRD tax return. OCR reading order is approximate: a label and its amount may be on different lines.\n\nRules:\n- vendor: the business that issued the receipt.\n- date: the transaction date as YYYY-MM-DD (NZ receipts use day/month/year). Empty string if not found.\n- total: the final amount paid including GST, as a number in NZD.\n- gst: the GST amount printed on the receipt if you can see one (OCR may misspell GST as 'GSI' or 'G5T'); otherwise 0. Do not calculate it; a later step checks GST.\n- gst_number: the vendor's GST number if printed (like 44-833-938), else empty string.\n- currency: 3-letter code, usually NZD.\n- category: the best NZ IRD business expense category from the allowed list. Use the person's note as a strong hint about purpose. 'Entertainment' for meals, drinks and hospitality with clients/staff; 'Low-value asset' for equipment under $1,000 excl. GST; 'Depreciable asset' for equipment $1,000 or more excl. GST; 'Personal (not deductible)' for clearly private purchases.\n- deductible_percent: 100 normally; 50 for Entertainment; 0 for Personal; for Home office, Motor vehicle or Phone & internet use 100 unless the note gives a business-use share.\n- line_items: short descriptions of the main items bought (at most 8).\n- confidence: high, medium or low depending on how legible and complete the receipt is.\n- notes: one short sentence explaining the category choice or anything missing.\n\nIf the text is empty or is not a receipt, return vendor 'Unknown vendor', total 0, gst 0, category 'Other business expense', confidence 'low', and say so in notes."
},
"output_schema": {
"type": "object",
"required": [
"vendor",
"date",
"total",
"gst",
"gst_number",
"currency",
"category",
"deductible_percent",
"line_items",
"confidence",
"notes"
],
"properties": {
"gst": {
"type": "number"
},
"date": {
"type": "string"
},
"notes": {
"type": "string"
},
"total": {
"type": "number"
},
"vendor": {
"type": "string"
},
"category": {
"enum": [
"Accounting & legal",
"Advertising & marketing",
"Bank fees & interest",
"Computer & software",
"Depreciable asset",
"Low-value asset",
"Entertainment",
"Home office",
"Insurance",
"Motor vehicle",
"Office supplies & stationery",
"Phone & internet",
"Professional development & subscriptions",
"Rent & lease",
"Repairs & maintenance",
"Travel & accommodation",
"Utilities",
"Contractors & wages",
"Other business expense",
"Personal (not deductible)"
],
"type": "string"
},
"currency": {
"type": "string"
},
"confidence": {
"enum": [
"high",
"medium",
"low"
],
"type": "string"
},
"gst_number": {
"type": "string"
},
"line_items": {
"type": "array",
"items": {
"type": "string"
}
},
"deductible_percent": {
"type": "number"
}
},
"additionalProperties": false
}
},
{
"id": "record",
"code": {
"source": "async function run(input, ctx) {\n const e = input.e || {};\n const text = String(input.text || '');\n const lines = text.split(/\\r?\\n/);\n const r2 = n => Math.round((Number(n) || 0) * 100) / 100;\n const near = (a, b, tol) => Math.abs(a - b) <= (tol == null ? 0.02 : tol);\n const amounts = s => { const out = []; const re = /(\\d{1,3}(?:,\\d{3})+|\\d+)\\.(\\d{2})(?!\\d)/g; let m; while ((m = re.exec(s))) out.push(r2(m[1].replace(/,/g, '') + '.' + m[2])); return out; };\n const all = amounts(text);\n const total = r2(e.total);\n const pct = Math.max(0, Math.min(100, Number(e.deductible_percent) || 0));\n const vendor = (e.vendor || 'Unknown vendor').trim();\n const date = (e.date || '').trim();\n const checks = [];\n let needs_review = false;\n const gstWord = /\\bG\\s?[S5]\\s?[TIl1]\\b/i;\n let gst_number = (e.gst_number || '').trim();\n if (!gst_number) { const m = /\\bG\\s?[S5]\\s?[TIl1]\\b[^\\d\\n]{0,20}(\\d{2,3}[- ]?\\d{3}[- ]?\\d{3})/i.exec(text); if (m) gst_number = m[1]; }\n const isNumberLine = l => /\\d{2,3}[- ]\\d{3}[- ]\\d{3}/.test(l);\n const gstLines = [];\n lines.forEach((l, i) => { if (gstWord.test(l) && !isNumberLine(l)) gstLines.push(i); });\n const inclStated = gstLines.some(i => /incl|includ|inclusive/i.test(lines[i]));\n const taxInvoice = /tax\\s*invoice/i.test(text);\n const declared = inclStated || !!gst_number || taxInvoice || gstLines.length > 0;\n const expected = r2(total * 3 / 23);\n const sameLine = [], adjacent = [];\n gstLines.forEach(i => {\n amounts(lines[i]).forEach(a => { if (a > 0 && a < total) sameLine.push(a); });\n [i - 1, i + 1].forEach(j => { if (lines[j] != null) amounts(lines[j]).forEach(a => { if (a > 0 && a < total) adjacent.push(a); }); });\n });\n let gst = 0, gst_status;\n const nearGst = sameLine.concat(adjacent).find(a => near(a, expected));\n const anywhere = all.find(a => near(a, expected) && !near(a, total, 0.005));\n const statedOther = sameLine.find(a => a <= expected + 0.02);\n if (total <= 0) {\n gst_status = 'no_total'; needs_review = true;\n checks.push('Could not read a total, so GST could not be checked.');\n } else if (declared && nearGst != null) {\n gst = nearGst; gst_status = 'verified';\n checks.push(`GST $${gst.toFixed(2)} is stated on the receipt and matches 15% of $${total.toFixed(2)}.`);\n } else if (statedOther != null) {\n gst = statedOther; gst_status = 'stated_differs'; needs_review = true;\n checks.push(`Receipt states GST $${gst.toFixed(2)}, but 15% of the total would be $${expected.toFixed(2)}; some items may be GST-free. Used the stated figure.`);\n } else if (declared && anywhere != null) {\n gst = anywhere; gst_status = 'found_on_receipt';\n checks.push(`GST is declared and $${gst.toFixed(2)} (15% of the total) appears on the receipt, though not on a labelled GST line.`);\n } else if (declared) {\n gst = expected; gst_status = 'calculated_not_found'; needs_review = true;\n checks.push(`Receipt declares GST${gst_number ? ' (GST No. ' + gst_number + ')' : ''} but $${expected.toFixed(2)} was not found on it; filled in at 15%. Check the receipt.`);\n } else {\n gst = 0; gst_status = 'not_declared'; needs_review = true;\n checks.push('No GST statement or GST number found on the receipt; recorded with no GST. Check the receipt.');\n }\n if (total > 0 && !all.some(a => near(a, total, 0.005))) { needs_review = true; checks.push(`The total $${total.toFixed(2)} does not appear in the receipt text.`); }\n if (!date) { needs_review = true; checks.push('No date found.'); }\n if (e.confidence === 'low') needs_review = true;\n const gst_check = checks.join(' ');\n const raw = [date, vendor.toLowerCase(), total.toFixed(2)].join('|');\n let h = 2166136261;\n for (let i = 0; i < raw.length; i++) { h ^= raw.charCodeAt(i); h = Math.imul(h, 16777619); }\n const id = (date || 'nodate') + '-' + (h >>> 0).toString(16).padStart(8, '0');\n const excl = r2(total - gst);\n const tax_year = (() => { const m = /^(\\d{4})-(\\d{2})/.exec(date); if (!m) return ''; const y = +m[1], mo = +m[2]; const end = mo >= 4 ? y + 1 : y; return (end - 1) + '-' + String(end).slice(2); })();\n const record = { id, vendor, date, tax_year, total, gst, gst_status, gst_check, needs_review, total_excl_gst: excl, gst_number, currency: e.currency || 'NZD', category: e.category, deductible_percent: pct, claimable_excl_gst: r2(excl * pct / 100), claimable_gst: r2(gst * pct / 100), line_items: e.line_items || [], note: input.note || '', confidence: e.confidence, model_notes: e.notes || '', source_file: input.file || '', submitted_at: new Date().toISOString() };\n const summary = `${vendor} ${date || '(no date)'} $${total.toFixed(2)} incl. GST $${gst.toFixed(2)} [${gst_status}] → ${e.category} (${pct}% deductible, tax year ${tax_year || '?'})${needs_review ? ' — NEEDS REVIEW: ' + gst_check : ''}`;\n return { id, record, summary };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Check GST & build record",
"input": {
"e": "{{nodes.extract.output}}",
"file": "{{nodes.resolve.output.source}}",
"note": "{{input.note}}",
"text": "{{nodes.ocr_text.output.text}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"intent": "Make a stable ID and tidy the row.",
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"id",
"record",
"summary"
],
"properties": {
"id": {
"type": "string"
},
"record": {
"type": "object"
},
"summary": {
"type": "string"
}
}
}
},
{
"id": "save",
"kind": "state",
"name": "Save to receipts table",
"input": {},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"state": {
"key": "{{nodes.record.output.id}}",
"table": "receipts",
"value": "{{nodes.record.output.record}}",
"action": "set"
},
"intent": "Store in the workflow's receipts table.",
"timeout": 120,
"output_schema": {}
},
{
"id": "resolve",
"code": {
"source": "async function run(input, ctx) {\n let p = String(input.file || '').trim();\n if (!p) throw new Error('No receipt file was given.');\n if (p.startsWith('file://')) p = decodeURIComponent(p.slice(7));\n const absolute = p.startsWith('/') || p.startsWith('~');\n if (!absolute) {\n if (!input.folder) throw new Error('\"' + p + '\" is a file name, but no Receipts folder is set up. Pass the full file or set the folder in Set Up.');\n p = String(input.folder).replace(/\\/$/, '') + '/' + p;\n }\n const m = /\\.([A-Za-z0-9]+)$/.exec(p);\n const ext = m ? m[1].toLowerCase() : 'jpg';\n return { source: p, copy_name: 'receipt-' + String(ctx.run.id).slice(0, 8) + '.' + ext };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Find the file",
"input": {
"file": "{{input.receipt}}",
"folder": "{{folders.receipts}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"source",
"copy_name"
],
"properties": {
"source": {
"type": "string"
},
"copy_name": {
"type": "string"
}
},
"additionalProperties": false
}
},
{
"id": "copy",
"kind": "tool",
"name": "Copy receipt in",
"tool": {
"name": "file_copy"
},
"input": {
"source": "{{nodes.resolve.output.source}}",
"destination": "{{nodes.resolve.output.copy_name}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 120,
"output_schema": {}
},
{
"id": "ocr_text",
"code": {
"source": "async function run(input, ctx) {\n const o = input.o;\n if (typeof o === 'string') return { text: o, blocks: o ? o.split('\\n').length : 0 };\n const blocks = [];\n const walk = v => {\n if (Array.isArray(v)) v.forEach(walk);\n else if (v && typeof v === 'object') {\n if (typeof v.text === 'string' && !Array.isArray(v.blocks)) blocks.push(v.text);\n else Object.values(v).forEach(walk);\n }\n };\n walk(o);\n ctx.log('OCR shape sample: ' + JSON.stringify(o).slice(0, 600));\n return { text: blocks.join('\\n'), blocks: blocks.length };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Tidy text",
"input": {
"o": "{{nodes.read.output}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"text",
"blocks"
],
"properties": {
"text": {
"type": "string"
},
"blocks": {
"type": "number"
}
},
"additionalProperties": false
}
}
],
"output": {
"gst": "{{nodes.record.output.record.gst}}",
"date": "{{nodes.record.output.record.date}}",
"total": "{{nodes.record.output.record.total}}",
"vendor": "{{nodes.record.output.record.vendor}}",
"summary": "{{nodes.record.output.summary}}",
"category": "{{nodes.record.output.record.category}}",
"gst_check": "{{nodes.record.output.record.gst_check}}",
"gst_status": "{{nodes.record.output.record.gst_status}}",
"receipt_id": "{{nodes.record.output.id}}",
"needs_review": "{{nodes.record.output.record.needs_review}}",
"deductible_percent": "{{nodes.record.output.record.deductible_percent}}"
},
"folders": [
{
"key": "receipts",
"help": "Where you keep receipt photos and PDFs. You can then submit a receipt by just its file name.",
"hint": {
"path": "e.g. Documents/Tax/Receipts"
},
"label": "Receipts folder",
"access": "read"
}
],
"secrets": [],
"examples": [
{
"name": "Stationery receipt",
"input": {
"note": "printer paper and ink for the home office",
"receipt": "countdown_receipt.jpg"
}
},
{
"name": "Woolworths company lunch",
"input": {
"note": "groceries for company lunch",
"receipt": "~/Downloads/IMG_2347.HEIC"
}
}
],
"model_slots": [
{
"slot": "extractor",
"locality": "local_only",
"preferred": "OsaurusAI/Qwen3.6-35B-A3B-mxfp4",
"strictness": "always",
"needs_tool_use": false
}
],
"input_schema": {
"type": "object",
"x-order": [
"receipt",
"note"
],
"required": [
"receipt"
],
"properties": {
"note": {
"type": "string",
"title": "Note",
"description": "Optional: what it was for, e.g. 'client lunch with Acme' or 'home office chair'."
},
"receipt": {
"type": "string",
"title": "Receipt",
"format": "file",
"description": "The receipt photo or PDF: attach it in chat, pick a file, or type a file name from your Receipts folder."
}
},
"additionalProperties": false
},
"output_schema": {
"type": "object",
"required": [
"receipt_id",
"vendor",
"date",
"total",
"gst",
"gst_status",
"gst_check",
"needs_review",
"category",
"deductible_percent",
"summary"
],
"properties": {
"gst": {
"type": "number",
"title": "GST"
},
"date": {
"type": "string",
"title": "Date"
},
"total": {
"type": "number",
"title": "Total (incl. GST)"
},
"vendor": {
"type": "string",
"title": "Vendor"
},
"summary": {
"type": "string",
"title": "Summary"
},
"category": {
"type": "string",
"title": "IRD category"
},
"gst_check": {
"type": "string",
"title": "GST check detail"
},
"gst_status": {
"enum": [
"verified",
"found_on_receipt",
"stated_differs",
"calculated_not_found",
"not_declared",
"no_total"
],
"type": "string",
"title": "GST check"
},
"receipt_id": {
"type": "string",
"title": "Receipt ID"
},
"needs_review": {
"type": "boolean",
"title": "Needs review"
},
"deductible_percent": {
"type": "number",
"title": "Deductible %"
}
},
"additionalProperties": false
},
"requirement_notes": {}
},
"changelog": "Updated",
"created_at": "2026-10-15T20:13:30Z",
"content_hash": "sha256:301252bc98c4a1a067b0f6a6b3b65c30b3230b95c3fa411b65a2b31f24875a5d",
"requirements": {
"notes": {},
"tools": [
"file_copy"
],
"models": [
{
"slot": "extractor",
"locality": "local_only",
"preferred": "OsaurusAI/Qwen3.6-35B-A3B-mxfp4",
"strictness": "always",
"needs_tool_use": false
}
],
"folders": [
{
"key": "receipts",
"help": "Where you keep receipt photos and PDFs. You can then submit a receipt by just its file name.",
"hint": {
"path": "e.g. Documents/Tax/Receipts"
},
"label": "Receipts folder",
"access": "read"
}
],
"network": [],
"plugins": [
"osaurus.vision"
],
"secrets": [],
"knowledge": [],
"mcp_servers": [],
"permissions": []
},
"format_version": 2,
"available_to_orchestrator": true
}Versions
- Version 3LatestUpdatedOct 15, 2026
1 version, newest first.