Jump to content

The JavaScript Automations That Quietly Became My Biggest Paychecks

From JOHNWICK

I didn’t set out to make money with JavaScript. At first, I was just automating boring stuff in the browser — filling forms, scraping data, sending a few emails. But slowly, those “tiny hacks” became full-fledged products. And to my surprise, the automations I built for fun ended up making me more consistent income than many of my client projects.

Here’s the toolkit of JavaScript automations that turned into my biggest paydays.

Scraping Leads With Cheerio

Every business wants leads. JS makes scraping fast and clean.
const axios = require("axios");
const cheerio = require("cheerio");

async function scrapeLeads() {
  const { data } = await axios.get("https://example.com/companies");
  const $ = cheerio.load(data);

  const leads = [];
  $(".company").each((i, el) => {
    leads.push({
      name: $(el).find(".name").text(),
      email: $(el).find(".email").text()
    });
  });
  console.log(leads);
}

scrapeLeads();

Browser Automation With Puppeteer

Clients needed web tasks automated (filling forms, scraping portals).
const puppeteer = require("puppeteer");

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto("https://example.com/login");

  await page.type("#username", "myuser");
  await page.type("#password", "mypassword");
  await page.click("#submit");

  await page.waitForNavigation();
  console.log("Logged in!");
  await browser.close();
})();

Automated Email Campaigns With Nodemailer

Why pay for Mailchimp when Node can do it for cheap?
const nodemailer = require("nodemailer");

async function sendEmail() {
  let transporter = nodemailer.createTransport({
    service: "gmail",
    auth: { user: "[email protected]", pass: "password" }
  });

  await transporter.sendMail({
    from: "[email protected]",
    to: "[email protected]",
    subject: "Weekly Report",
    text: "Revenue this week: $5,600"
  });
}

sendEmail();

Social Media Bots With Puppeteer + Cron

Influencers wanted daily engagement. Bots delivered.
const cron = require("node-cron");
const puppeteer = require("puppeteer");

cron.schedule("0 9 * * *", async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto("https://twitter.com/login");
  // login code...
  await page.type("textarea", "Automating Twitter posts with JS 🚀");
  await page.keyboard.press("Enter");
  await browser.close();
});

E-commerce Price Monitoring

Shops needed alerts when competitors dropped prices.
const axios = require("axios");
const cheerio = require("cheerio");

async function checkPrice() {
  const { data } = await axios.get("https://example.com/product");
  const $ = cheerio.load(data);
  const price = $("#price").text();
  console.log("Current price:", price);
}

setInterval(checkPrice, 3600 * 1000); // check every hour

PDF Invoice Generator

Freelancers love automating invoices.
const PDFDocument = require("pdfkit");
const fs = require("fs");

function generateInvoice(client, amount) {
  const doc = new PDFDocument();
  doc.pipe(fs.createWriteStream("invoice.pdf"));
  doc.fontSize(20).text("Invoice", 100, 100);
  doc.text(`Client: ${client}`);
  doc.text(`Amount: $${amount}`);
  doc.end();
}

generateInvoice("Acme Corp", 600);

Real-Time Dashboards With Socket.io

Managers pay for live data dashboards.
const io = require("socket.io")(3000);

io.on("connection", (socket) => {
  console.log("New client connected");
  setInterval(() => {
    socket.emit("update", { sales: Math.random() * 1000 });
  }, 2000);
});

Client Chatbots With OpenAI API

JS + AI = money.
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.OPENAI_KEY });

async function chatbot(question) {
  const resp = await client.chat.completions.create({
    model: "gpt-4o-mini",
    messages: [{ role: "user", content: question }]
  });
  console.log(resp.choices[0].message.content);
}

chatbot("How do I reset my password?");

Cron-Driven Reporting Systems

Recurring tasks = recurring income.
const cron = require("node-cron");
const fs = require("fs");

cron.schedule("0 8 * * *", () => {
  const report = `Sales today: $${Math.floor(Math.random() * 5000)}`;
  fs.writeFileSync("daily_report.txt", report);
  console.log("Report generated:", report);
});

API Wrappers for Non-Tech Businesses

Businesses couldn’t use APIs directly — I built wrappers.
const express = require("express");
const axios = require("axios");
const app = express();

app.get("/weather/:city", async (req, res) => {
  const { city } = req.params;
  const { data } = await axios.get(
    `https://api.weatherapi.com/v1/current.json?key=APIKEY&q=${city}`
  );
  res.json(data);
});

app.listen(4000, () => console.log("Server running"));

The Secret: Small Scripts → Big Paychecks

The scripts themselves weren’t complex. The money came from packaging:

  • Lead scraping → data subscriptions
  • Bots → agency services
  • Dashboards → client retainers
  • Invoicing → SaaS tools

JavaScript side projects turned into quiet, compounding income streams.

Read the full article here: https://javascript.plainenglish.io/the-javascript-automations-that-quietly-became-my-biggest-paychecks-24b3b8a0a0f1