Automatic Discourse topic tagger with AI
Build a workflow that automatically tags new topics on a Discourse community forum once a week, conservatively and cheaply, without manual triage. Trigger. A weekly cron job (e.g. Friday 9am in your timezone) kicks off a collector step. Note that cron only fires on the published version of a workflow. Flow: Collect new topics — read-only step that scans the Discourse forum for topics created since the last successful run (store a watermark so it never rescans the whole instance). Exclude internal/staff-only categories (e.g. Announcements, internal team categories) and their subcategories. For each new topic, pull the title, first-post body, and existing tags. Classify and apply tags with AI — for each new topic: Build a small local keyword/TF-IDF index of existing tags so candidate lookup is cheap and doesn't require an embeddings API call. Filter candidates to only tags allowed in that topic's category (respecting the forum's tag-group restrictions). Ask an LLM (e.g. Claude, or your preferred model provider) which candidate tags clearly apply, with a confidence score and short reason, plus optional ideas for brand-new tags that don't exist yet. Apply rules: only add tags that already exist (never auto-create new ones — surface new-tag ideas for manual review instead); require high confidence (e.g. ≥90%); cap additions at 2 per topic per run; never let a topic exceed 5 total tags; adding zero tags is a valid outcome. Write the tag additions back to Discourse additively (never remove existing tags, never touch title/body). If the forum rejects some tags due to category restrictions, drop just those and retry with the rest. Log each run's decisions (tagged topics, reviewed-but-untagged topics, suggested new tags) to persistent storage for reporting. Tagging dashboard — a simple internal webpage, gated to your team, that reads the run logs and shows per-run results: what was tagged and why, what was reviewed but left alone, and a queue of suggested new tags for someone to manually approve/create in Discourse. Connectors/external services: a Discourse connector for reading forum topics/tags and writing tag updates — or your team's forum/community platform if different — and an LLM provider connector (e.g. Anthropic Claude) for classification — or your preferred model provider. Side effects. The only write to the forum is adding tags to topics; everything else (collection, dashboard) is read-only. Persist a watermark, a tag index, and per-run logs in shared storage so runs are incremental and auditable. Tools used: Discourse, Anthropic
What this prompt builds
A weekly workflow that automatically tags under-tagged Discourse forum topics by querying an AI agent against a curated tag list, applying up to two high-confidence tags per topic. Designed for community platforms where manual tagging is inconsistent, it saves moderators time and improves content discoverability without requiring community members to change their habits. The workflow respects category restrictions, never auto-creates new tags, and logs all decisions for manual review.
The problem
Community forums rely on consistent tagging for organization and SEO discoverability, but teaching members to tag habitually is difficult and time-consuming for moderators. Many Discourse topics end up under-tagged or untagged, making valuable content harder to find and reducing the overall health of the knowledge base. This workflow solves that by automatically reviewing topics with fewer than two tags each week and applying high-confidence tags from an existing tag library, using an AI agent to match content to the most relevant organizational categories without manual triage.
Solution and impact
The workflow runs weekly to scan new or under-tagged topics, querying an AI agent to match content against a curated tag list and apply up to two tags per topic when confidence is high. It respects category tag restrictions, never auto-creates tags, and logs every decision for transparency and manual review of suggested new tags. This saves community teams and members significant time while quietly improving content discoverability and SEO performance across the forum.
