> ## Content Index
> Fetch the complete content index at: https://www.hubwiz.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# 上个月我用AI自动化赚了$4,200
- URL: https://www.hubwiz.com/blog/i-made-2400-last-month-with-ai-automation/
- Published: 2026-06-09T06:29:07.000Z
- Updated: 2026-06-09T06:29:07.000Z
- Description: 3 个 Python 自动化脚本。完整的生产代码。真实的客户数据。没有代理公司，没有投资人——只有一台笔记本和一个免费 API 密钥。
- Author: admin
- Tags: SIDE HUSTLE, #Import 2026-10-14 14:41

我不是创业公司创始人。我没有团队，也没有风险投资。我是一个中级开发者，发现了大多数人正在忽视的东西：**AI 今天能做的事情与大多数企业仍在手动做的事情之间的差距**。

这个差距非常巨大，而现在，对于任何懂一点 Python 的人来说，它都能带来不错的收入。

下面是我具体做了什么、收了多少钱，以及你如何在这个周末复制它。

## 1、4,200 美元到底从哪里来

在深入代码之前，先给你一个诚实的明细，让你知道这不是空洞的炒作：

| 服务           | 客户 / 项目 | 收入        |
| ------------ | ------- | --------- |
| 自动化客户        | 4 个长期客户 | $1,800/月  |
| 文档智能         | 3 个长期客户 | $720/月    |
| 本地评论回复       | 1 个长期客户 | $280/月    |
| 内容再利用（一次性设置） | 2 个项目   | $1,400 总计 |
| 总收入          | —       | $4,200    |

其中四分之三是**长期合作**。我每个月大概只需要做 2 小时的维护。

## 2、没人告诉你的残酷真相

大多数"用 AI 赚钱"的内容都是空洞的垃圾。"建一个聊天机器人！""卖提示词！""开代理公司！"

这些都没告诉你*要写什么代码*、*谁会为此付费*、或者*能赚多少*。

真正有效的是这个：

> ***企业不需要花哨的 AI。他们需要让现有的工作流程不再浪费时间和金钱。***

这就是你的机会。找到那些无聊、重复的任务。用 Python + LLM 把它自动化。收取 200–2,000 美元的设置费。每月收取 50–300 美元的维护费。

这是**服务业务，不是产品**。产品需要数年。服务下周就能赚钱。

## 3、我为真实客户取得的结果

在你看到代码之前，先看看我前三个客户的 before/after：

| 客户                    | 之前                              | 之后                               |
| --------------------- | ------------------------------- | -------------------------------- |
| 8 人会计事务所              | 每月花 40 小时手动处理发票                 | 脚本 45 分钟搞定——快了 98%               |
| 牙科诊所（22 个分店）          | 老板每周查看约 60 条 Google 评论，只回复约 20% | 100% 在 24 小时内回复，自动生成草稿           |
| 电商品牌（Shopify，$2M ARR） | 没有结构化数据审查，凭感觉做决策                | 每周收到通俗易懂的报告；第二周就发现了一个 $14K 的库存异常 |

这些数字才是能打动客户的。不是承诺，不是演示。

## 4、3 个真正能赚钱的自动化

我只保留三个。我去掉了邮件分类（企业邮箱有严重的安全/隐私风险），精简了内容再利用（太饱和了）。这三个在客单价、销售难度和技术壁垒方面有最佳组合。

### 4.1 文档智能：800 美元的周末项目

**它能做什么：** 读取 PDF（合同、发票、报告），自动提取结构化数据到电子表格。

**谁愿意付费：** 律师事务所、会计事务所、房地产中介、保险公司。

**他们为什么愿意付费：** 一个助理律师读合同 = $35/小时 × 200 小时/月 = $7,000/月的劳动力成本。你的脚本几秒钟搞定。

**收费标准：** $500–1,500 设置费 + $100–200/月维护费。

```python
# requirements: anthropic pdfplumber pandas pydantic python-dotenv loguru
import json
from pathlib import Path
import anthropic
import pdfplumber
import pandas as pd
from pydantic import BaseModel, Field
from loguru import logger
from dotenv import load_dotenv
load_dotenv()
client = anthropic.Anthropic()

class LineItem(BaseModel):
    description: str
    amount: float

class InvoiceData(BaseModel):
    vendor_name: str
    invoice_number: str
    invoice_date: str
    total_amount: float
    line_items: list[LineItem] = Field(default_factory=list)

def extract_text_from_pdf(pdf_path: str) -> str:
    with pdfplumber.open(pdf_path) as pdf:
        pages = [page.extract_text() or "" for page in pdf.pages]
    return "\n".join(pages)

def extract_invoice_data(pdf_path: str) -> InvoiceData | None:
    logger.info(f"Processing: {pdf_path}")
    try:
        text = extract_text_from_pdf(pdf_path)
    except Exception as e:
        logger.error(f"Failed to read PDF {pdf_path}: {e}")
        return None
    if not text.strip():
        logger.warning(f"No extractable text in {pdf_path}")
        return None
    try:
        response = client.messages.create(
            model="claude-sonnet-4-5",
            max_tokens=1024,
            messages=[{
                "role": "user",
                "content": f"""Extract invoice fields and return ONLY valid JSON matching this schema:
{{
  "vendor_name": "string",
  "invoice_number": "string",
  "invoice_date": "YYYY-MM-DD",
  "total_amount": 0.00,
  "line_items": [{{"description": "string", "amount": 0.00}}]
}}
Invoice text:
{text[:4000]}
Return ONLY the JSON object. No markdown, no explanation."""
            }]
        )
        raw = response.content[0].text.strip()
        data = json.loads(raw)
        return InvoiceData(**data)
    except json.JSONDecodeError as e:
        logger.error(f"Failed to parse JSON from Claude response: {e}")
        return None
    except Exception as e:
        logger.error(f"Unexpected error processing {pdf_path}: {e}")
        return None

def process_invoice_folder(folder_path: str, output_csv: str = "invoices.csv") -> pd.DataFrame:
    folder = Path(folder_path)
    pdfs = list(folder.glob("*.pdf"))
    logger.info(f"Found {len(pdfs)} PDFs to process")
    records = []
    for pdf in pdfs:
        result = extract_invoice_data(str(pdf))
        if result:
            record = result.model_dump()
            record["source_file"] = pdf.name
            records.append(record)
        else:
            logger.warning(f"Skipped: {pdf.name}")
    df = pd.DataFrame(records)
    df.to_csv(output_csv, index=False)
    logger.success(f"Exported {len(df)} invoices to {output_csv}")
    return df

if __name__ == "__main__":
    df = process_invoice_folder("./invoices")
    print(df.head())

```

**部署方式：** 把它部署到 [Railway](https://railway.app/?ref=hubwiz.com)，设置一个简单的 cron 定时任务。用 GitHub Actions 在 S3 存储桶或 Google Drive 文件夹有新文件时触发运行。总基础设施成本：约 $5/月。

### 4.2 本地商家评论回复：最容易成交的销售

**它能做什么：** 监控 Google Reviews 和 Yelp。当有新评论出现时，生成个性化、专业的回复草稿，通过邮件发送给店主一键审批。

**谁愿意付费：** 餐厅、沙龙、牙医、脊椎按摩师、酒店——任何有在线评论的本地商家。

**为什么容易成交：** 给他们看一个处理不当的负面评论的例子。问：*"这让你损失了多少客户？"* 答案总是"比 $100/月 多。"

**收费标准：** $150–300/月/商家。不收设置费更容易成交。

**算账：** 20 个本地商家 × $200/月 = **$4,000/月 长期收入。** 完全可自动化。

```python
# requirements: anthropic pydantic python-dotenv loguru
import anthropic
from pydantic import BaseModel
from loguru import logger
from dotenv import load_dotenv
load_dotenv()
client = anthropic.Anthropic()

class ReviewResponse(BaseModel):
    draft_response: str
    tone_used: str  # "warm_apology" | "enthusiastic_thanks" | "professional_neutral"
    suggested_action: str | None  # e.g. "Offer 10% discount on next visit"

def generate_review_response(
    business_name: str,
    business_type: str,
    review_text: str,
    star_rating: int,
    reviewer_name: str,
) -> ReviewResponse | None:
    if star_rating >= 4:
        sentiment = "positive"
    elif star_rating <= 2:
        sentiment = "negative"
    else:
        sentiment = "mixed"
    try:
        response = client.messages.create(
            model="claude-sonnet-4-5",
            max_tokens=600,
            system=f"""You write professional, warm responses to customer reviews for {business_name},
a {business_type}. Sound human, not corporate. Never be defensive.
For negative reviews: acknowledge, apologize sincerely, offer a resolution path.
For positive reviews: thank specifically, reinforce what they loved.
Keep responses under 150 words.
Return ONLY valid JSON matching this schema:
{{
  "draft_response": "string",
  "tone_used": "warm_apology | enthusiastic_thanks | professional_neutral",
  "suggested_action": "string or null"
}}""",
            messages=[{
                "role": "user",
                "content": f"""Write a response to this {star_rating}-star {sentiment} review from {reviewer_name}:
"{review_text}"
Return only the JSON object."""
            }]
        )
        raw = response.content[0].text.strip()
        import json
        data = json.loads(raw)
        return ReviewResponse(**data)
    except Exception as e:
        logger.error(f"Failed to generate response: {e}")
        return None

if __name__ == "__main__":
    result = generate_review_response(
        business_name="Sunrise Dental",
        business_type="dental clinic",
        review_text="Waited 45 minutes past my appointment. The cleaning was fine but the front desk was rude.",
        star_rating=2,
        reviewer_name="Marcus T.",
    )
    if result:
        print(f"\nDraft:\n{result.draft_response}")
        print(f"\nTone: {result.tone_used}")
        print(f"Suggested action: {result.suggested_action}")

```

### 4.3 数据洞察报告生成器：你的最高客单价服务

**它能做什么：** 获取原始业务数据（Shopify、QuickBooks、HubSpot 的 CSV 导出），生成通俗易懂的周报或月报，包含关键洞察、发现的异常和建议的行动。

**谁愿意付费：** 有数据但没有分析师的小企业主。电商品牌。营销团队。

**收费标准：** $300–800/月。定位为"你的兼职数据分析师"。

```python
# requirements: anthropic polars python-dotenv loguru pydantic
import json
from pathlib import Path
import anthropic
import polars as pl  # faster than pandas for this use case
from loguru import logger
from dotenv import load_dotenv
load_dotenv()
client = anthropic.Anthropic()

def compute_statistics(df: pl.DataFrame) -> dict:
    """Extract key stats without sending raw data to the API."""
    stats = {
        "row_count": len(df),
        "columns": df.columns,
        "null_counts": {col: df[col].null_count() for col in df.columns},
        "numeric_summary": {},
        "sample_rows": df.head(5).to_dicts(),
    }
    for col in df.columns:
        if df[col].dtype in (pl.Float64, pl.Int64, pl.Float32, pl.Int32):
            stats["numeric_summary"][col] = {
                "mean": round(df[col].mean() or 0, 2),
                "median": round(df[col].median() or 0, 2),
                "std": round(df[col].std() or 0, 2),
                "min": df[col].min(),
                "max": df[col].max(),
            }
    return stats

def generate_business_report(
    csv_path: str,
    business_context: str,
    report_period: str = "last 30 days",
) -> str | None:
    logger.info(f"Loading data from {csv_path}")
    try:
        df = pl.read_csv(csv_path, infer_schema_length=500)
    except Exception as e:
        logger.error(f"Failed to read CSV: {e}")
        return None
    stats = compute_statistics(df)
    logger.info(f"Computed stats for {stats['row_count']} rows")
    try:
        response = client.messages.create(
            model="claude-sonnet-4-5",
            max_tokens=2000,
            system="""You are a senior business analyst writing clear, actionable reports
for non-technical business owners. Use plain English. No jargon.
Lead with the single most important insight.
Format with these sections: Executive Summary, Key Metrics, Anomalies & Risks, 3 Recommended Actions.
Recommended actions must be specific, ranked by expected impact, and immediately actionable.""",
            messages=[{
                "role": "user",
                "content": f"""Analyze this business data and write a concise executive report.
Business context: {business_context}
Report period: {report_period}
Data statistics:
{json.dumps(stats, indent=2, default=str)}
Write the full report."""
            }]
        )
        return response.content[0].text
    except Exception as e:
        logger.error(f"Claude API error: {e}")
        return None

def save_report(report: str, output_path: str = "business_report.md") -> None:
    Path(output_path).write_text(report, encoding="utf-8")
    logger.success(f"Report saved to {output_path}")

if __name__ == "__main__":
    report = generate_business_report(
        csv_path="./shopify_orders.csv",
        business_context="DTC skincare brand, ~$2M ARR, sells primarily via Shopify",
        report_period="April 2025",
    )
    if report:
        save_report(report)
        print(report[:500])  # preview

```

**技术升级提示：** 我在所有数据项目中从 `pandas` 切换到了 `polars`——大 CSV 文件上快 3–10 倍，客户在意的演示速度很重要。用 `uv` 管理项目依赖，比 pip 干净得多。

## 5、如何在 7 天内获得第一个客户

大多数人先做了东西，然后奇怪为什么没人买。以下是真正有效的流程：

**第 1–2 天：** 选一个自动化。用真实数据在本地跑通，生成演示输出。

**第 3 天：** 录一个 90 秒的 Loom 视频，展示它在逼真的假数据上运行。

**第 4–5 天：** 找 30 个潜在客户。本地商家：Google Maps。代理公司：LinkedIn。小企业：本地 Facebook 商业群组。

**第 6 天：** 发 20 条 outreach 消息。用这个模板：

> "Hi \[Name\], 我注意到 \[关于他们业务的具体事情\]。我做了个工具可以 \[它能做什么\]——花了我一个周末。做了个 90 秒的演示，展示它在样本数据上的效果——介意我发给你看看吗？不是推销，只是想让你看看可能性。"

**第 7 天：** 跟进 demo 链接。问一个问题：*"这个问题你们现在是手动解决的吗？"* 然后成交。

## 6、保持低成本的技术栈

| 工具                     | 成本         | 用途             |
| ---------------------- | ---------- | -------------- |
| Anthropic API (Claude) | \~$10–50/月 | AI 大脑          |
| Railway 或 Render       | $5–20/月    | 部署脚本 + cron 任务 |
| Pydantic v2            | 免费         | 结构化输出 + 验证     |
| python-dotenv          | 免费         | 密钥管理           |

**每个客户的基础设施成本：约 $5–15/月。** 收费 $100–500/月。这就是你的利润空间。

## 7、法律与道德考量

这部分不是可选阅读。如果你要处理企业数据，在接客户之前你需要了解这些风险：

**数据隐私**

- 发票和合同包含 PII（姓名、地址、财务信息）。在把客户数据发送到任何第三方 API 之前，确保你的客户协议涵盖了这一点，并检查企业是否受 GDPR、CCPA 或 HIPAA 约束。
- Anthropic 的 API 有数据隐私政策——去了解一下。对于医疗客户（牙医、诊所），你可能需要一份商业伙伴协议（BAA）。

**邮件与通信访问**

- 我从这个指南中去掉了邮件分类机器人，原因很充分：访问企业邮箱有重大的法律风险。如果你确实要做邮件自动化，使用 OAuth（不是原始密码），获得明确的书面许可，并安全存储凭证——永远不要明文存储。

**评论平台**

- Google 的服务条款禁止用机器人自动发布评论或回复。本指南中的评论回复工具生成的是*供人工审批的草稿*——这是正确的方法。不要直接自动化发布。

**合同**

- 为每个客户使用简单的服务协议。明确工具做什么、访问什么数据、如何存储、以及退出时怎么处理。Rocket Lawyer 有不到 $30 的模板。

如果你对任何具体客户的情况不确定，咨询律师。$200 的法律咨询比失去客户或被起诉便宜多了。

## 8、什么区分了赚钱的人和不赚钱的人

不是编程技能。不是 AI 模型。

是这个：**赚钱的人把丑陋的 v1 解决方案交付给真实客户，而不是为没人用的完美 v2 解决方案而构建。**

你的第一个自动化会很乱。有时会出问题。客户不会在意，因为它节省了他们的时间和金钱，这才是他们真正购买的东西。

这个周末就开始。选一个自动化。找一个客户。收点钱。

AI 能做的事情与大多数企业所知道的之间的差距现在非常巨大——而且不会永远这么大。

---

原文链接: [I Made $4,200 Last Month Automating Boring Tasks With Python + Claude](http://freedium-mirror.cfd/https://medium.com/stackademic/i-made-4-200-last-month-automating-boring-tasks-with-python-claude-fed9f4dc76b4?source=home%5Ffor%5Fyou---------1-109--------------------27a968a6%5F9c02%5F4dda%5Faf9c%5F7a82dfd1fbef-------15-------)

汇智网翻译整理，转载请标明出处