DEV Community

Kai Thorne
Kai Thorne

Posted on

I Built a Money-Making Machine with Free AI Tools — Here is the Full Blueprint

I Built a Money-Making Machine with Free AI Tools — Here's the Full Blueprint

Six months ago, I was paying $200+/month for SaaS tools to run my digital products business. CRM, email marketing, analytics, content scheduling, customer support — every tool had a subscription.

Then I killed them all. Every single one.

Today I run the same operation for $6/month total (just the VPS). Here's exactly how I did it, with real code you can copy.

The Problem: Death by Subscription

My monthly stack before the purge:

Tool Cost Purpose
ChatGPT Plus $20 AI writing + analysis
Notion $10 Project management
Mailchimp $17 Email marketing
Buffer $15 Social scheduling
Intercom $74 Customer support
Supabase $25 Database
Ghost $29 Blog hosting
Zapier $30 Automation
Total $220/mo

That's $2,640/year before I made a single dollar. The tools were eating the business.

The Rebuild: $0/Month Stack

Here's what replaced everything:

1. Gemini API (Free Tier) → Replaces ChatGPT Plus + Zapier

Google's Gemini API gives you 15 requests/minute and 1 million tokens/minute on the free tier. That's enough to run an entire business.

import google.generativeai as genai

genai.configure(api_key=os.environ["GEMINI_API_KEY"])
model = genai.GenerativeModel("gemini-2.0-flash")

def generate_content(topic, style="technical"):
    prompt = f"""Write a {style} blog post about {topic}.
    Include: practical examples, code snippets, real-world use cases.
    Tone: experienced developer sharing knowledge, not guru-speak."""
    response = model.generate_content(prompt)
    return response.text

# This runs 100+ times/day for free
blog_post = generate_content("Python automation scripts for small business")
Enter fullscreen mode Exit fullscreen mode

What it replaces: $20/mo ChatGPT Plus + $30/mo Zapier (I use Gemini for both content AND workflow automation logic)

2. SQLite → Replaces Supabase + Notion + Airtable

I store literally everything in one SQLite file:

import sqlite3

DB_PATH = "/home/user/business.db"

def get_db():
    conn = sqlite3.connect(DB_PATH)
    conn.row_factory = sqlite3.Row
    return conn

# Revenue tracking
def log_revenue(platform, amount, product_id=None):
    db = get_db()
    db.execute("""
        INSERT INTO revenue (platform, amount, product_id, logged_at)
        VALUES (?, ?, ?, datetime('now'))
    """, (platform, amount, product_id))
    db.commit()

# Content calendar
def schedule_content(platform, title, scheduled_date):
    db = get_db()
    db.execute("""
        INSERT INTO content (platform, title, status, scheduled_at)
        VALUES (?, ?, 'scheduled', ?)
    """, (platform, title, scheduled_date))
    db.commit()

# Customer tracking
def add_customer(email, source, product):
    db = get_db()
    db.execute("""
        INSERT OR IGNORE INTO customers (email, source, first_purchase, acquired_at)
        VALUES (?, ?, ?, datetime('now'))
    """, (email, source, product))
    db.commit()
Enter fullscreen mode Exit fullscreen mode

One file. No migrations. No hosting. No limits. Backs up in 1 second with cp.

What it replaces: $25/mo Supabase + $10/mo Notion + whatever Airtable costs now

3. Cron Jobs → Replaces Zapier + Buffer + Mailchimp

The real magic. I use Linux cron + simple Node.js scripts to automate everything:

# Content publishing (runs every 4 hours)
0 */4 * * * node /home/user/scripts/publish_content.js

# Revenue tracking (runs hourly)  
0 * * * * node /home/user/scripts/check_revenue.js

# Customer email sequence (runs daily at 9am)
0 9 * * * node /home/user/scripts/email_sequence.js

# Social media cross-posting (runs 3x daily)
0 8,14,20 * * * node /home/user/scripts/social_post.js
Enter fullscreen mode Exit fullscreen mode
// publish_content.js — reads from SQLite, publishes to platforms
const db = require('./db');

async function publishScheduled() {
    const pending = db.query(
        "SELECT * FROM content WHERE status='scheduled' AND scheduled_at <= datetime('now')"
    );

    for (const item of pending) {
        if (item.platform === 'dev.to') {
            await publishToDevTo(item);
        } else if (item.platform === 'gumroad') {
            await publishToGumroad(item);
        }
        db.run("UPDATE content SET status='published' WHERE id=?", [item.id]);
    }
}

publishScheduled();
Enter fullscreen mode Exit fullscreen mode

What it replaces: $30/mo Zapier + $15/mo Buffer + $17/mo Mailchimp

4. Telegram Bot → Replaces Intercom

Free, unlimited, and my customers actually prefer it:

const TelegramBot = require('node-telegram-bot-api');
const bot = new TelegramBot(process.env.TELEGRAM_TOKEN, { polling: true });

// Auto-respond to common questions
bot.on('message', async (msg) => {
    const text = msg.text.toLowerCase();

    if (text.includes('refund') || text.includes('money back')) {
        await bot.sendMessage(msg.chat.id, 
            "No problem! Reply with your Gumorder order ID and I'll process it within 24 hours.");
        await notifyOwner(`Refund request from ${msg.chat.first_name}: ${text}`);
    }
    else if (text.includes('download') || text.includes('access')) {
        await bot.sendMessage(msg.chat.id,
            "Check your email for the download link! If you can't find it, reply with your order ID.");
    }
    else {
        // Forward to owner for personal response
        await notifyOwner(`Customer message from ${msg.chat.first_name}: ${text}`);
        await bot.sendMessage(msg.chat.id,
            "Thanks for reaching out! I'll get back to you personally within a few hours.");
    }
});
Enter fullscreen mode Exit fullscreen mode

What it replaces: $74/mo Intercom (and honestly, it's better because customers get a human response)

5. dev.to API → Replaces Ghost

Free blog hosting with a built-in developer audience:

const DEVTO_KEY = process.env.DEVTO_API_KEY;

async function publishBlog(title, bodyMarkdown, tags) {
    const response = await fetch('https://dev.to/api/articles', {
        method: 'POST',
        headers: {
            'api-key': DEVTO_KEY,
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({
            article: {
                title,
                body_markdown: bodyMarkdown,
                tags: tags.join(', '),
                published: true,
            }
        })
    });
    return response.json();
}
Enter fullscreen mode Exit fullscreen mode

What it replaces: $29/mo Ghost (and dev.to has a built-in audience of millions)

The Full Cost Breakdown

Item Monthly Cost
VPS (Hetzner CX22) $6.00
Gemini API $0 (free tier)
SQLite $0
Telegram Bot $0
dev.to API $0
Gumroad 10% of sales only
Total fixed cost $6/month

Compare that to the $220/month stack. I saved $2,568/year and got a more reliable system.

What I Sell (And How It Makes Money)

The automated system produces and sells:

  1. Technical blog posts → Drive traffic to products (3 posts/week, auto-scheduled)
  2. Digital products on Gumroad → AI tools, automation templates, code bundles ($9-$29 each)
  3. Custom scripts → Sold directly via Telegram ($50-$200 per project)

The content machine runs 24/7. I wake up to new views, new followers, and occasionally new sales. The whole thing costs less than a Netflix subscription.

The Numbers After 3 Months

  • Published: 30+ blog posts across platforms
  • Products: 3 digital products live on Gumroad
  • Cost savings: $642 vs. the old SaaS stack
  • Revenue: Growing month over month (the automation frees up time to create more products)

The key insight: most SaaS tools are just cron jobs with a UI. Once you realize that, you can replace almost anything with a bash script and a database.

Getting Started (Copy My Stack)

  1. Get a $6 VPS — Hetzner, Vultr, DigitalOcean, whatever
  2. Install Node.js + SQLiteapt install nodejs && npm install better-sqlite3
  3. Get a free Gemini API keyai.google.dev
  4. Create a Telegram bot — Talk to @botfather on Telegram
  5. Set up dev.to API — Settings → Extensions → API Keys
  6. Copy the scripts above — They work as-is
  7. Add cron jobscrontab -e and paste the schedules

Total setup time: Under 2 hours.

The Real Lesson

You don't need expensive tools to build a business. You need:

  • A database (SQLite)
  • A scheduler (cron)
  • An AI model (Gemini free tier)
  • A communication channel (Telegram)
  • A publishing platform (dev.to)

Everything else is a UI wrapper around these primitives.

Stop paying for dashboards. Start shipping products.


Found this useful? I share automation scripts and business templates on Gumroad. The tools that run this business? They're for sale too.


Related Reading


Tags: ai, automation, sideproject, python, tutorial

Top comments (0)