Back to Blog
fastapi
automation
side-hustle
python
entrepreneurship

How I Automated My Side Hustle with FastAPI (and Made My First $500)

A personal story of how I used FastAPI to turn repetitive freelance work into a simple automation tool that started earning money on its own.

Niklas L.
5 min read

💡 How I Automated My Side Hustle with FastAPI (and Made My First $500)

Last year, I hit a wall with my freelance work. I loved the projects, but the admin side was eating my time alive. Sending invoices, tracking payments, updating spreadsheets — it felt endless.

Instead of hiring help, I decided to automate the pain away. The result? A small FastAPI app that ended up making me my first $500 in passive income.


The Problem

Every week, I’d lose several hours doing the same routine:

None of it was hard — just painfully repetitive. I realized that if I could automate those tasks, I could free up hours every week to focus on actual client work (or, let’s be honest, take a break).


The Solution

I built a small web service using FastAPI, which became the backbone of my automation system. It handled invoice generation, emails, and database updates — all while running quietly in the background.

FastAPI’s async support was a lifesaver. It let me process multiple invoice and email requests at once, without the app choking under load.


Step 1: Mapping My Workflow

The first thing I did was sit down and document everything I did on autopilot. I grouped tasks into “worth automating” and “manual for now.” Here’s the list that made the final cut:

This exercise alone made me realize how much time I was wasting just keeping my freelance operation running.


Step 2: Building the App

Once I knew what needed to be automated, I opened up VS Code and started building.

🧾 Invoice Generation

I created an endpoint that accepted client details and payment info, then generated a PDF invoice using the reportlab library. Here’s the basic setup:

@app.post("/generate-invoice")
async def generate_invoice(data: InvoiceData):
    pdf = create_invoice_pdf(data)
    return FileResponse(pdf)

Simple, clean, and reusable. I could call this endpoint from anywhere — even from a Google Sheets script if I wanted.


✉️ Email Automation

For sending payment reminders, I used the Gmail API. I wrote a small FastAPI service that sent out emails automatically a few days before or after payment due dates.

The best part was how FastAPI’s dependency injection kept everything modular. I could test my email functions in isolation without messing up the rest of the app.


💾 Database Management

I needed a place to store client details and payment history. SQLAlchemy made that easy. My schema was barebones but solid:

class Payment(Base):
    id = Column(Integer, primary_key=True)
    client_name = Column(String)
    amount = Column(Float)
    status = Column(String)

It wasn’t fancy, but it did the job. I could query everything I needed in seconds — who paid, who didn’t, and how much I earned that month.


Step 3: Testing and Launch

Before letting the app loose, I wrote a bunch of unit and integration tests. Pytest made it easy to mock out external services like Gmail and payment processors, so I didn’t accidentally spam my real clients during testing.

Once things looked stable, I shared the app with a few freelancer friends. They tried it, broke it (in the best ways), and gave me valuable feedback that shaped the final version.


Lessons Learned


The Results

Within two months of launching, a few of my freelancer friends started using my app regularly. Word spread through Slack groups and Reddit threads, and before I knew it, people were offering to pay for access.

That’s how I made my first $500 from a project that started as a weekend experiment.


Takeaway

You don’t need a startup idea or a massive launch plan. Just automate something that annoys you, polish it enough to be useful, and share it with others.

FastAPI does the heavy lifting — you just have to show up and build.


Bonus: How You Can Start

If you’re itching to build your own automation tool, here’s what I’d do differently if I started today:

  1. Identify your biggest time-wasters.
  2. Sketch out a simple API that could automate them.
  3. Use FastAPI and proven templates to speed things up.
  4. Share your solution — your pain point is almost certainly someone else’s too.

Who knows? Your next side project might just pay for your next vacation.


Related Articles