# Reply bot for Discourse?

**URL:** https://meta.discourse.org/t/reply-bot-for-discourse/71928
**Category:** Feature
**Tags:** automation, ai
**Created:** [October 12, 2017, 10:57am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928 "2017-10-12T10:57:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [October 12, 2017, 10:57am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/1 "2017-10-12T10:57:37Z")

</div>

Has anyone built a bot like thing that can reply to posts if specific conditions are met (e.g. "topic in category foo, does not contain string `bar`)?

I have quite a few “issue” type topics in the developer community I am moderating, and 75% of my replies are just asking for software and environment information. It would be great if I could have a bot version of myself that could check with some simple rules and then create a reply to the topic if they are not met.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [October 12, 2017, 11:24am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/2 "2017-10-12T11:24:59Z")

</div>

Use a post template for the category?

I know it is frustrating, especially when using Discourse as a technical support forum. There are standard questions you need to ask e.g. serial number, model number, product series etc. that 90% of the posters don’t care to provide.

Maybe also consider the “Canned Answer” plugin.

---

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [October 12, 2017, 3:14pm UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/3 "2017-10-12T15:14:59Z")

</div>

Post template doesn’t work as only ~75% of the posts need that information 😕  
Also having one makes 50% of _all_ posts have parts of the template (not filled out) inside them ☹

“Canned Replies” plugin is in use, still have to 1) read the post and 2) do the mental decision then 3) click the cog 4) click the Canned Replies 5) click the search box 6) type the name of the reply I need 7) click the insert icon 8) click the “Reply” button. That gets old really fast unfortunately (which means after at least 30 minutes of doing this every morning…). 🤷‍♂️ (Also it is all from my account which is gives me notifications even though I only made them offer the necessary information and didn’t _really_ reply)

But thanks for the suggestions - unfortunately I already tried both ☀

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [October 12, 2017, 4:22pm UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/4 "2017-10-12T16:22:43Z")

</div>

If you’re comfortable configuring and self-hosting your own bot software, I wrote a hubot adapter for discourse that may handle your use case.

> [@Hubot Adapter for Discourse](https://meta.discourse.org/t/hubot-adapter-for-discourse/63419):
>
> I built a [Hubot](https://hubot.github.com/) adapter for Discourse. [https://github.com/featheredtoast/hubot-discourse-adapter](https://github.com/featheredtoast/hubot-discourse-adapter) This should work moderately well for communities that desire bot integrations. There are a few gotchas (see the readme) but for the most part it has been pretty incredible to tinker with so far. Something my community desired was a dice roller, which I knew existed as a hubot plugin. While there have been other attempts at [integrating dice rollers into discourse](https://meta.discourse.org/t/simple-dice-roller-plugin/9958/15), if I was going to run a bot agains…

---

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [October 12, 2017, 6:15pm UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/5 "2017-10-12T18:15:08Z")

</div>

> [@awole20](#):
>
> If you’re comfortable configuring and self-hosting your own bot software,

Not yet, but you have to start somewhere 😉

> [@awole20](#):
>
> I wrote a hubot adapter for discourse that may handle your use case.

Awesome, I don’t know anything about Hubot as well (yet), but that looks like what I was looking for.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [October 14, 2017, 7:35am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/6 "2017-10-14T07:35:58Z")

</div>

Maybe something similar to the `Akismet` plugin, but only verifies each new post based on whether the required content is there instead of sending the content to Akismet?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 19, 2019, 3:15am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/7 "2019-11-19T03:15:29Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 18, 2023, 11:05pm UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/8 "2023-08-18T23:05:36Z")

</div>



---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [August 19, 2023, 6:22am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/9 "2023-08-19T06:22:38Z")

</div>

First this was bumped by the system, I did not dig this up to provide a reply.  
Second, checked if the OP was active on this site and the OP has not been seen since Feb 14, '19 so don’t expect the OP to read any reply or select a solution for this.

* * *

This could potentially be resolved with the [Discourse AI - AI Bot](https://meta.discourse.org/t/discourse-ai-ai-bot-chatbot-chatgpt-anthropic/266012) which is still being developed. As one with early access to it I am trying very very few of the actual first topic post here with it to see what it does and while the AI Bot can give an intelligent human readable response, many of the responses are not what I would accept for an answer. However having seen such technology being developed elsewhere the AI technology has the potential to achieve the goal noted here.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 19, 2023, 8:04am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/10 "2023-08-19T08:04:20Z")

</div>

There’s the Automation ‘Auto Responder’ script that can post a reply based on what words/phrases are included in a post. I’m not sure, but I wonder if that could be inverted and expanded a little? 🤔

I’ll slide this over to #Contribute > Feature, but it’s quite an old one so there may be other similar feature requests to neaten up.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [August 19, 2023, 8:18am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/11 "2023-08-19T08:18:25Z")

</div>

> [@JammyDodger](#):
>
> There’s the [Automation](https://meta.discourse.org/t/discourse-automation/195773) ‘Auto Responder’ script that can post a reply based on what words/phrases are included in a post. I’m not sure, but I wonder if that could be inverted and expanded a little? 🤔

If you are suggesting that the `Auto Responder` could be enhanced with AI then I fully agree. You should add that as an AI feature request, the worst that can happen is that the post just sits there doing nothing. The best is that it gets implemented.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [August 22, 2023, 2:10am UTC](https://meta.discourse.org/t/reply-bot-for-discourse/71928/12 "2023-08-22T02:10:35Z")

</div>

This is technically easy for someone with some Ruby programming experience. Just write a plugin, responding to the `:post_created` event, write some code like this:

```ruby
DiscourseEvent.on(:post_created) do |*params|
    post, opt, user = params

    if post.raw.include "foo"
        PostCreator.create!(
             User.find_by(id: bot_id),
             topic_id: post.topic_id,
             raw: "bar",
        )
    end
end

```
