Reply bot for Discourse?

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.

1 Like

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.

1 Like

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

“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…). :man_shrugging: (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 :sunny:

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.

6 Likes

Not yet, but you have to start somewhere :wink:

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

2 Likes

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?

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 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.

1 Like

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? :thinking:

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

1 Like

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.

1 Like

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:

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
4 Likes