Skip to content

Back to portfolio

Text-to-invoice

Text-to-Invoice and Automated Billing Integration with QuickBooks

A plain-language text message from a phone becomes a draft invoice in QuickBooks Online, with ambiguous client names resolved by asking, and nothing sent to a client until a person approves it.

How it fits together

  1. Inputs

    • Time entry by text

      A plain-language message from a phone, sent to one guarded bot, says who the work was for and what was done.

      • Telegram
  2. Engine

    Time-to-invoice workflow

    An n8n workflow behind the shared router that serves every agent through one bot.

    • n8n
    1. Parse

      A Claude model turns the message into structured fields through a forced tool call.

      • Claude
    2. Match without guessing

      Client names are matched by rules. An ambiguous match asks which client was meant.

    3. Approve in Telegram

      Each entry waits for a person to approve, edit, or reject it. Approval buttons clear after one tap, so a request can't be approved twice.

      • Telegram
  3. Outputs

    • Draft invoice

      Approved time becomes a draft invoice in QuickBooks Online, never a sent one.

      • QuickBooks Online
    • Confirmation to the owner

      A short reply in the same chat says what was drafted, so the owner always sees the result.

      • Telegram

Guardrails

  • No step can send an invoice
  • A guard on chat and sender runs before any model
  • Monthly spend limit and a daily spend watchdog

The problem

A service business bills for time it has to remember, so entries pile up and invoices go out late. Automating billing is the easy part. Automating it so a wrong client or a duplicate can't reach the person paying is the real job.

What I built

  • Time entry by plain-language text message from a phone, parsed into structured fields.
  • Client matching by rules that asks which client was meant instead of guessing when a name is ambiguous.
  • Draft-only invoice creation in QuickBooks Online, with an approval step in Telegram before anything is final.
  • One shared, guarded router that serves every agent through a single bot, so the billing flow reuses the same checks as the rest of the system.
  • Spend controls on the unattended parts: a monthly limit and a daily watchdog.

How I built it

An n8n workflow reached through one Telegram bot. A deterministic guard on the chat and sender runs before any model call, a Claude model does the parsing, and QuickBooks Online receives the result as a draft. The safe behavior is structural: the workflow has no step that sends an invoice, so a person always makes the final call.

What it shows

I integrate AI with the systems that handle money, and I make the safe behavior a property of the workflow: drafts only, ambiguous matches ask, and a person approves.