showcase · tier 2 · business
Invoice chaser
jq filters the overdue rows out of the CSV, reminders get drafted, and a human gate sits before anything is saved.
The whole file
6 tasks · 6 waves · the plan falls out of the bindings, nothing is scheduled by hand.
t2-invoice-chaser.nika.yamlsource
nika: v1workflow: id: invoice-chaser description: "Ledger CSV → overdue filter → drafted reminders → human gate → drafts file"model: ollama/qwen3.5:4b # local · zero key · swap for groq/llama-3.3-70b (drafting is a fast-model job)vars: ledger_csv: "./finance/invoices.csv"tasks: ledger: invoke: tool: "nika:read" args: { path: "${{ vars.ledger_csv }}" } rows: with: csv: ${{ tasks.ledger.output }} invoke: tool: "nika:convert" args: input: "${{ with.csv }}" from: csv to: json has_header: true overdue: with: rows: ${{ tasks.rows.output }} invoke: tool: "nika:jq" args: input: "${{ with.rows }}" expression: 'map(select(.status == "overdue"))' drafts: with: overdue: ${{ tasks.overdue.output }} when: ${{ size(with.overdue) > 0 }} infer: prompt: | Draft one short, polite payment reminder per overdue invoice · ${{ with.overdue }} Markdown · one section per client · firm but warm. approve: with: drafts: ${{ tasks.drafts.output }} when: ${{ with.drafts != null }} # nothing drafted · nothing to approve invoke: tool: "nika:prompt" args: message: "Save the reminder drafts for sending?" default: false save: with: drafts: ${{ tasks.drafts.output }} approved: ${{ tasks.approve.output }} when: ${{ with.drafts != null && with.approved == true }} # zero overdue → drafts skipped (null) · don't write nothing invoke: tool: "nika:write" args: path: "./finance/reminders-to-send.md" content: "${{ with.drafts }}"outputs: overdue: value: ${{ tasks.overdue.output }} description: "The overdue rows the reminders were drafted for"nika inspect · engine 0.105.0 · vendored graph, never re-derived
6 declared edges · 6 waves · the plan falls out of the bindings