Why I Built My Own Invoice Automation Tool
After spending 3 hours every month manually sending invoices, I decided to build a solution that would put this task on autopilot.
Building tools that solve your own problems is underrated. Last year, I was spending roughly 3 hours every month on invoice management—creating PDFs, tracking payments, following up on late invoices. That’s 36 hours a year, or almost a full work week.
So I built something better.
The Problem with Traditional Invoicing
Most invoicing tools are clunky, expensive, or require too much manual intervention. You still have to:
- Create the invoice each time
- Attach it to an email
- Wait for payment
- Follow up manually
My Automation Stack
The solution I built integrates with:
- Stripe for payment processing
- Gmail API for automated follow-ups
- Notion for tracking all invoices
Now, when a client needs an invoice, I run a single command and the entire process happens automatically.
Results After 6 Months
| Metric | Before | After |
|---|---|---|
| Time per invoice | 15 min | 30 sec |
| Late payments | 23% | 8% |
| Monthly admin time | 3 hours | 20 min |
The ROI was immediate. I saved 2.5 hours per month, which translates to roughly $1,200 annually in reclaimed time.
The Code
Here’s a simplified version of how the automation works:
async function generateAndSendInvoice(client: Client, amount: number) {
const invoice = await stripe.invoices.create({
customer: client.stripeId,
amount: amount * 100, // cents
});
await emailClient.send({
to: client.email,
subject: `Invoice #${invoice.number}`,
attachments: [await generatePDF(invoice)],
});
await notion.databases.create({
parent: INVOICE_DATABASE,
properties: { /* tracking properties */ }
});
}
The key insight: automation isn’t about removing humans from the loop entirely. It’s about removing the repetitive, low-value tasks so you can focus on the work that actually matters.
If you’re interested in a similar setup for your freelance business, reach out. I might open-source a version of this tool soon.