# Topic auto tagging

**URL:** <https://meta.discourse.org/t/topic-auto-tagging/54894>\
**Category:** Feature\
**Created:** [2016年十二月28日 18:10 UTC](https://meta.discourse.org/t/topic-auto-tagging/54894 "2016-12-28T18:10:19Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2018年八月8日 05:38 UTC](https://meta.discourse.org/t/topic-auto-tagging/54894/18 "2018-08-08T05:38:28Z")

</div>

You can create a plugin with the below simple code. But the difficulty level is fully depends upon your auto tagging logic/requirement.

```plaintext
DiscourseEvent.on(:topic_created) do |topic|
  guardian = Guardian.new(Discourse.system_user)
  DiscourseTagging.tag_topic_by_names(topic, guardian, ["bug"], append: true) if topic.title.match(/bug/)
end

```

---

_[View the full topic](https://meta.discourse.org/t/topic-auto-tagging/54894)._
