DEV Community

 AI Automation Enterenpeur
AI Automation Enterenpeur

Posted on

Build a "Start Here" Index for Your Community with 30 Lines of Python

Every online community hits the same wall. Members ask questions that were already answered, because the answers are buried in a date-sorted feed. The fix is to organize by problem instead of by date, and you can automate most of that cleanup with a small script.

Here's how I'd build it.

The idea

  1. Export or copy your past questions (title + link) into a JSON file.
  2. Map each question to a "problem" bucket using simple keyword rules.
  3. Generate a Markdown "start here" post grouped by problem.
  4. Pin it, and re-run the script whenever new answers pile up.

No AI required for version one. Keyword rules are boring, predictable, and easy to debug, which is exactly what you want from a first automation.

The input

A file called questions.json:

[
  {"title": "How do I follow up with new leads automatically?", "url": "https://example.com/post/1"},
  {"title": "Best way to start a newsletter for my SaaS?", "url": "https://example.com/post/2"},
  {"title": "Can I turn my spreadsheet into a weekly report?", "url": "https://example.com/post/3"}
]
Enter fullscreen mode Exit fullscreen mode

The script

import json

PROBLEMS = {
    "lead follow-up": ["lead", "follow up", "crm", "booking"],
    "email and newsletters": ["email", "newsletter", "inbox"],
    "data and reporting": ["spreadsheet", "report", "dashboard"],
    "getting started": ["start", "first", "beginner"],
}

def categorize(title):
    text = title.lower()
    for problem, keywords in PROBLEMS.items():
        if any(k in text for k in keywords):
            return problem
    return "uncategorized"

def build_index(questions):
    index = {}
    for q in questions:
        index.setdefault(categorize(q["title"]), []).append(q)
    return index

def to_markdown(index):
    lines = ["# Start here: find your problem", ""]
    for problem in sorted(index):
        lines.append(f"## {problem.title()}")
        for q in index[problem]:
            lines.append(f"- [{q['title']}]({q['url']})")
        lines.append("")
    return "\n".join(lines)

if __name__ == "__main__":
    with open("questions.json") as f:
        questions = json.load(f)
    print(to_markdown(build_index(questions)))
Enter fullscreen mode Exit fullscreen mode

Run it with python build_index.py > start_here.md and paste the output into a pinned post.

How it works

PROBLEMS is your whole configuration. Each key is a problem in your members' words; each value is a list of keywords. categorize() returns the first bucket whose keyword appears in the title, so order matters: put the most specific problems first.

build_index() groups questions into buckets, and to_markdown() turns those buckets into headings and links.

Anything that lands in "uncategorized" is a signal. Either you need a new keyword, or you've found a new problem your members care about.

Making it better

  • Schedule it. Run it weekly with cron or a GitHub Action and diff the output so you only update the pinned post when something changes.
  • Add an LLM fallback. For uncategorized titles only, ask a model to pick one of your existing buckets. Keep the keyword rules as the first pass so results stay predictable and cheap.
  • Track gaps. Count questions per bucket. The bucket with the most questions and the fewest good answers is your next lesson.

Why bother

A problem-sorted index gives new members a quick win, cuts repeat questions, and shows you what to create next. It's a tiny automation with an outsized payoff.

I'm building my own community, Automation Entrepreneur, around exactly this kind of practical automation. Join us here: https://www.skool.com/automation-enterenpeur-7666

Top comments (0)