This guide explains how to set up an auto responder using the Automation Plugin in Discourse. The auto responder can automatically reply to posts or personal messages containing specific keywords.
Required user level: Administrator
An auto responder in Discourse can automatically reply to posts containing certain keywords or phrases. This feature can help moderators and administrators focus on more complex tasks by automating responses to common queries or situations.
Summary
This guide covers:
- Creating a new auto responder script
- Choosing and configuring a trigger
- Setting up word/answer pairs
- Enabling the automation
Creating a new script
- Navigate to your site’s automation’s page at
example.discourse.com/admin/plugins/discourse-automation
- Click
+ Create
to create a new script - Select the
Auto Responder
option - Click
+ Create
again to proceed
Choosing a trigger
Select one of two trigger options:
- Post Created / Edited
- Personal Message Created
Post Created / Edited trigger options
- Action Type: Limit to posts being created or edited
- Category: Limit to specific categories
- Group: Limit to private messages in a specific group’s inbox
-
Ignore Automated: Skip if the sender has a
noreply
email or is from an automated source - Ignore Group Members: Skip if the sender is a member of the specified group
- Valid Trust Levels: Limit to posts from users with specific trust levels
- First Post Only: Limit to a user’s first post
- First Topic Only: Limit to a user’s first topic
Personal Message Created trigger options
- Users: Limit to PMs sent to specific users
- Group: Limit to PMs sent to a specific group
- Ignore Staff: Skip if the sender is a staff user
-
Ignore Automated: Skip if the sender has a
noreply
email or is from an automated source - Ignore Group Members: Skip if the sender is a member of the specified group
- Valid Trust Level: Limit to PMs from users with specific trust levels
Configuring script options
After setting up the trigger, configure the following options:
- Word / answer pairs: Define keywords and corresponding responses
- Answering user: Select the user account for automated replies
- Once checkbox: Limit the automation to trigger only once per topic
Setting up word/answer pairs
- Click the
Configure
button next tolist of word / answer pairs
- Enter key/value pairs:
- Key: The trigger word or phrase (case-insensitive)
- Value: The automated response text
The
key
is evaluated as a regex string. Escape special characters like.
with a backslash (e.g.,\.
). You can test your Regex expressions on regex101.com using the ECMAScript flavor.
Use
%%KEY%%
in thevalue
field as a placeholder for the detected trigger word.
Enabling the automation
- Check the
Enabled
checkbox at the bottom of the screen - Click
Update
to save your changes
Automations can be saved without being enabled by leaving the
Enabled
checkbox unchecked.
Last edited by @hugh 2024-07-26T02:28:53Z
Check document
Perform check on document: