Discourseの自動化

:discourse2: Summary Discourse Automation lets you automate actions through scripts and triggers. Customisation is made through an automatically generated UI.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

  • Easy automation of complex workflows
  • Triggers automations at specific dates, periodically, or on specific events
  • Provides automatically generated UIs to specify options for your automation

Configuration

Automations can be created and updated from Admin → Plugins → Automations, or directly from /admin/plugins/discourse-automation.

Available scripts

Guide Script Trigger(s) Description
:bookmark: Add user to group through custom field :black_small_square:Recurring
:black_small_square:First logged on
Adds a user to a group based on a Custom User Field
:bookmark: Append last checked by :black_small_square:After post cook Adds a ‘last checked by’ function to the bottom of the OP
:bookmark: Append last edited by :black_small_square:After post cook Adds a ‘last edited by’ note to the bottom of the OP
:bookmark: Auto Responder :black_small_square:Post edited/created
:black_small_square:PM created
Given a series of keywords and associated replies, automatically respond with the corresponding reply
Auto Tag topic :black_small_square:Post created/edited
:black_small_square:PM created
Automatically tag a topic
Close topic :black_small_square:Point in time
:black_small_square:Stalled wiki
Automatically close a topic
Create Post :black_small_square:Recurring
:black_small_square:Point in time
Creates a post
Flag post on Words :black_small_square:Post edited/created Flag a topic on creation/edition if it contains specific words
Gift Exchange :black_small_square:Point in time Simple implementation of the Secret Santa game
Group Category Notification Default :black_small_square:Category created/edited Automatically sets a group notification level for newly created subcategories
Make banner topic :black_small_square:Point in time Convert a topic into a banner notice
Pin Topic :black_small_square:Point in time Pin and Unpin a topic in the future
Random Assign
(Assign)
:black_small_square:Point in time
:black_small_square:Recurring
Randomly Assign a topic
Schedule a PM with data explorer results
(Data Explorer)
:black_small_square:Recurring Send a regular PM with the results of a data explorer query
Send Chat message
(Chat)
:black_small_square:Event started
:black_small_square:Recurring
Sends a Chat message to a Channel
Send PMs :black_small_square:First accepted solution (Solved)
:black_small_square:User badge granted
:black_small_square:User added to group
:black_small_square:Stalled wiki
:black_small_square:Recurring
:black_small_square:User promoted
:black_small_square:API call
:black_small_square:User removed from group
Send PMs with support for placeholders
Suspend User By Email :black_small_square:API call Suspend a user for a specified duration
Topic required words :black_small_square:Topic Enforce the presence of at least one of the specified words in the posts of a topic
:bookmark: Triage posts using AI (Discourse AI) :black_small_square:Post created/edited Enhance the management and moderation of forum posts by automating the process of classifying posts
User Global Notice :black_small_square:Stalled topic
:black_small_square:First accepted solution (Solved)
Displays a global notice on the site for a specific user
:bookmark: User Group Membership through Badge :black_small_square:Recurring
:black_small_square:User first logged in
Automatically add users to a group based on their earned badges
Zapier webhook :black_small_square:User promoted
:black_small_square:User added to group
:black_small_square:User badge granted
:black_small_square:User removed from group
Calls a Zapier webhook

Available triggers

Note that due to their nature, each script only supports certain triggers. For example it wouldn’t make sense for a script enforcing the content of a post to trigger when a user is added to a group.

All of the available triggers are mentioned in the “Available scripts” table above.

Most of the triggers are self-explanatory, but here are a couple that may need a little more detail:

Trigger Description
After post cook Triggers after a post is rendered for display
API Call Triggers when a certain API endpoint is called
Stalled wiki Triggers when a wiki hasn’t been edited for a while
Stalled topic Triggers when a topic has not received replies after a certain time
Topic Triggers when a reply is made to a topic

If you need any clarification on any others please feel free to ask below. :slight_smile:

More scripts and triggers to come!

Custom Automations

You can also create custom Automations. :partying_face: Check out our developer’s guide for more information - Create custom Automations


:discourse2: Hosted by us? This plugin is available on our Business and Enterprise plans. Automation | Discourse - Civilized Discussion

Last edited by @tobiaseigen 2025-07-16T20:41:38Z

Check documentPerform check on document:
「いいね!」 73

참고로, 기존 자동화와 해당 트리거 전체를 표로 정리하여 OP를 업데이트했습니다. :+1:

(가이드도 더 추가하고 싶습니다. ‘사용자를 그룹에 추가…’ 가이드가 혼자서는 조금 외로워 보입니다 :slight_smile:)


Setting up the ‘Append last edited by’ automationSetting up the 'Append last checked by' automation 에 대한 몇 가지 워크스루가 추가되었습니다. :tada:

그리고 새로운 스크립트, 뱃지를 통한 사용자 그룹 멤버십이 추가되었습니다. :partying_face: 이 스크립트는 따끈따끈한 신상이므로 사용해 보시고 결과를 알려주세요. :+1:

「いいね!」 10

今、私はとてもとても…愚かではないですが、それに近い気分です。自動化はどこで構築できますか?プラグインの下では、自動化を有効または無効にすることしかできません。

「いいね!」 3

プラグインを有効にすると、ここに新しい項目が表示されるはずです。

表示するにはページを更新する必要がある場合があります。

「いいね!」 3

そして今、私は本当に愚かに感じています🤦‍♂️

ありがとうございます。

「いいね!」 1

私も以前それで詰まりました :slight_smile:

このトピックへの返信は、30日後に自動削除されるように設定した方が良いでしょう。少なくともこの返信は。

「いいね!」 2

official プラグイントピックでは、もはやそのようなことは行っていません。トピックタイマーによって多くの有益な情報が失われてきました。現在では、手動でキュレーションし、重要な議論を個別のタグ付きトピックに分割しています(また、最初から個別のトピックを開始することを推奨しています)。:+1:

「いいね!」 18

投稿が新しいトピックに分割されました:解決済みトピックを自動的に閉じ、テンプレート応答を投稿する

:information_source: Discourse Automation は Discourse コアにバンドルされたため、このプラグインを個別にインストールする必要はなくなりました。 :partying_face:

:discourse2: 当社でホストされていますか? この変更はあなたには一切影響しません。 :+1: Business または Enterprise プランをご利用の場合、このプラグインを引き続きお楽しみいただけますのでご安心ください。

「いいね!」 6

カテゴリを変更できる自動化スクリプトはありますか?より柔軟な「スケジュール公開」システムに使用したいと考えています。

スクリプトは次のような動作を想定しています。

  • 定期的に実行され、
  • 特定のカテゴリ内のトピックで、返信に何らかのマーカーがあるもの(例:「解決済み」または「返信に「公開」のような特定のテキストが含まれている」)を確認します。
  • その返信の日付(または「解決済み」ステータス)が指定されたオフセット(例:昨日、または1週間前)よりも古い場合、
  • すべての返信を削除し、
  • 指定されたカテゴリに移動し、
  • オプションで、設定可能なタグを追加します。

より高度なバージョンでは、トリガーとなる返信の日付/時刻を探し、その日付/時刻を過ぎていれば公開します。

また、ターゲットカテゴリ(スクリプト設定で許可されるターゲットカテゴリを指定)や、タグも探すことができます。

「いいね!」 3

これは可能ですが、現時点ではこのようなものは何も存在しません。

「いいね!」 1

こんにちは、このトリガーの使用例がわかりません。PMを送信できるようですが、誰に送信できますか? Wikiは複数のユーザーが編集できるためです。ありがとうございます。

UIで誰がPMを受け取るかを決定します。

「いいね!」 1

カスタムスクリプトを作成する方法はありますか?

このトピックでは、プライベートメッセージ(PM)にモデレーションを要求する方法を探しています。

そのため、次のようなものがあると想像できます。

  • PMの作成をトリガー
  • レビューのための自動フラグ付け

可能だと思います。

ただし、開発スキルが必要になります。

「いいね!」 4

それは素晴らしいですね。リンクしたトピックのOpが、その機能がどれほど強く必要とされているかによって、スクリプトのスポンサーになることを検討するかもしれません。

迅速な対応をありがとう、Jammy。いつもながら豊富な知識です。

「いいね!」 2

こんにちは、これがどのように機能するのか理解できません。値が「はい」または「いいえ」(ドロップダウン)を取ることができるカスタムユーザーフィールドがあります。しかし、自動化を作成する際に、カスタムフィールドの名前のみが求められ、その値は求められません。カスタムフィールドの値をテストできない場合、このユーザーをグループに追加する自動化をトリガーするにはどうすればよいですか?ありがとうございます。

カスタムフィールドの値はグループ名と一致する必要があります。したがって、質問が「どちらが好きですか?」で、回答が「犬」と「猫」の場合、グループのフルネームは「犬」と「猫」でなければなりません。「犬好き」や「猫好き」と呼ぶことはできません。

リンクされたガイドにヒントがあります。

しかし、私も最初は理解できませんでした。

「いいね!」 1

わかりました、理解しました。つまり、グループ名が「はい」または「いいえ」である必要があるため、カスタムフィールドで「はい」または「いいえ」と答えるという私のユースケースは不可能ということですね… :roll_eyes:

「いいね!」 1

投稿のキーワードに基づいて「投稿の自動タグ付け」を行うことはできますか、それとも投稿タイトルですか?グループまたはカテゴリに基づいてのみ自動タグ付けできるようです。これは私のケースではあまり役に立ちません。