Automatisation de 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

74 « J'aime »
Are there any examples "in the wild" of interesting things the Discourse Automation plugin can do?
Creating bot on discourse
An 'add to group' script for the Discourse Automation
Trigger an email to all users periodically with a pre-defined message or link
Sending a private message automatically to new users?
Choose groups and watched categories on signup
Users self-select Category on Registration... is it possible?
Can discourse delete archived posts automatically and accept registration without email?
Prevent users from moving topics in other categories
Webhook - TL Demotion
Add users to groups on signup
Ability to add multiple topic timers
A Bot to match random users?
Can I send message to who had the special badge automatically?
How to integrate Discourse Gamification with an external system (redeem and award points)
Future pin topics! (feature request)
Trust level freeze
Onboarding course?
When a thread is too important to lose
Welcome message
Creating an automated message upon successfully answering to a topic
Automatic Messaging
Trust Level Wishlist Items
How to change owner of invite links?
Voting plugin requirements
No errors, instance not coming back up after rebuild
Teach Discobot?
Restricting users to join any one private group
Discobot Type Message Automation
Can watching a category watch all its subcategories as well?
Linked topics (splitting and managing megatopics)
How to set a welcome email to be sent as soon as a user signs up?
Unlist or archive a post when it has no reply per category
Chat Auto-responder?
Endorsement Prompts
What if badges could optionally synchronize group membership?
Convert a category to private and add users to a specific group with access
Is there a component so when a topic is marked as Solved, the topic gets locked and a custom message is posted with it?
Setting up spam detection in your community
Creating a custom Automation
Exclude certain categories from the Trust Levels
Query to create some groups based on activity
500 error using automation plugin
Pie-in-the-sky idea: arbitrary automation scripts via docker image
How can I set up invites by members so admins control what invitees see?
Default Tag for specific Categories
How to respond to automatic topics with AI
Pin on certain days
Discourse AI - AI triage
Restrict users to post certain words per category
Gamification beyond Leaderboard
Configuring automatic post review triggers
Is it possible to moderate all personal messages sent between users?
Where would I find documentation on auto-bumping?
Alternative sign up pathways
A Plug-In to convert Discourse Forum Discussions into Clear Proposal Revisions with Community-Sourced Justifications
Bug Report: "Auto Tag Topic" in Discourse Automation — Link Detection Not Working, Onebox Triggers Image
Mandatory Topic Timers for all topics in a category
How to generate AI replies for forum topics using Persona
Is there a way to schedule the creation of a topic? And to schedule a reply to someone else's topic?
Is there a way to schedule the creation of a topic? And to schedule a reply to someone else's topic?
Topic ID as a variable?
Automation script: Move topic on close
Can I send an automated welcome message to all new users?
Allow bumping for topics with zero replies
Setting up automated admin notice alerts
Changing automated Personal Message text
Category Exclusion (Blacklist) for Automation Triggers
Advice on a support forum
Welcome message
Setting up toxicity detection in your community
Automated tagging when topic is created
Discourse Chat Integration
Email-in Filtering or Multiple Emails per Category/Group
Unanswered topic notification
Autoresponder (after 15 minutes) when someone joins my discourse
2.8.0.beta3: User-selectable Avatar Flair, Last Topic Visit Indicator, Native File Picker, and more
Add timer to banner topics
Agree to additional terms before joining group
@ mentioning every community members
Reconciling Discourse Chat with other Community Chat Tools like Discord
Send Promotion PMs
Groups for Users
Bulk mark messages and posters as spam
How to automate messages
Automatically move topic category after topic close
Bringing Icebreakers into Discourse
How are `system_messages.welcome_user.*` values used?
Limiting Subscription Length
Adding tags to topics created with Discourse Embed feature?
Discourse AI - Periodic summary reports
Automatically delete users flagged by system?
How to create autoresponder using automation
Select a group when registering?
Make topic a global banner for n period of time when created in a category
Group based on Custom Field
Discourse AI - AI triage using Persona
Looking for help posting automating data explorer reports to my forum
Automatically Assigning Titles Based on Trust Level in Discourse
Reply bot for Discourse?
PM auto responder
Has anyone created a custom Automation?
Create custom Automations
How to schedule posts (not topics)?
Automate post creation on Discourse with multiple users
Customise text for TL3 promotion PM
Choose groups and watched categories on signup
Grant Badge when user visits link
Discourse Subscriptions with Thrive Cart
Can I send message to who had the special badge automatically?
Automatic and periodic PMs for new users
Invitation Links are Only Working for Non-existing Users & Breaking Our Current Implementation
Add members of trust_level_3 to another group and remove them once they lose the trust_level_3
Webhooks plugin
Membership anniversary
How to add all members in a new group?
New user alerts
An 'add to group' script for the Discourse Automation
Daily Summary Feedback
Watched Words Reference Guide
Can a user block a user group?

Pour information, j’ai mis à jour le message initial avec un tableau de toutes les automatisations existantes et leurs déclencheurs associés. :+1:

(J’espère également ajouter d’autres guides, car celui pour « Ajouter un utilisateur à un groupe… » a l’air un peu seul :slight_smile:)


Quelques autres tutoriels ont été ajoutés pour Setting up the ‘Append last edited by’ automation et Setting up the 'Append last checked by' automation. :tada:

Et un tout nouveau script, Adhésion au groupe d’utilisateurs par badges. :partying_face: Celui-ci est tout frais sorti, donc si vous l’essayez, faites-nous savoir comment vous vous en sortez. :+1:

11 « J'aime »

Maintenant, je me sens très très… pas stupide, mais presque. Où puis-je créer des automatisations ? Sous plugins, je ne peux qu’activer ou désactiver Automation.

3 « J'aime »

Après avoir activé le plugin, vous devriez voir un nouvel élément ici :

Il peut être nécessaire de rafraîchir la page pour le voir.

3 « J'aime »

Et maintenant, je me sens vraiment stupide :man_facepalming:

Merci.

1 « J'aime »

J’ai déjà été bloqué sur celui-ci :slight_smile:

Les réponses à ce sujet devraient probablement être configurées pour se supprimer automatiquement après 30 jours. Au moins cette réponse devrait l’être.

2 « J'aime »

Nous ne faisons plus cela pour les sujets de plugins #officiels. Trop de bonnes informations ont été perdues à cause des minuteurs de sujet. Nous les organisons maintenant manuellement et divisons toute discussion importante en sujets distincts et étiquetés (ainsi que nous encourageons les gens à commencer des sujets distincts dès le départ). :+1:

18 « J'aime »

Un message a été divisé en un nouveau sujet : Automatisation pour fermer les sujets résolus et poster une réponse modèle

:information_source: Discourse Automation est désormais inclus dans le cœur de Discourse, ce plugin n’aura donc plus besoin d’être installé séparément. :partying_face:

:discourse2: Hébergé par nos soins ? Ce changement ne vous affectera en rien. :+1: Si vous êtes sur les plans Business ou Enterprise, vous pouvez continuer à profiter de ce plugin sans vous soucier de quoi que ce soit.

6 « J'aime »

Existe-t-il un script d’automatisation qui peut changer de catégorie ? J’aimerais l’utiliser pour créer un système de « publication planifiée » plus flexible.

J’imagine que le script :

  • s’exécute périodiquement, et
  • vérifie les sujets dans une catégorie donnée qui ont un marqueur dans une réponse (comme, marqué comme résolu ou la réponse contient un certain texte, comme « PUBLIER »).
  • Si la date de cette réponse (ou le statut « résolu ») est antérieure à un décalage donné (par exemple, hier ou une semaine),
  • supprime toutes les réponses
  • déplace vers la catégorie donnée
  • facultativement, ajoute des étiquettes configurables

Une version plus sophistiquée pourrait rechercher une date/heure dans la réponse déclencheuse et publier si nous sommes maintenant après cette date/heure.

Elle pourrait également rechercher la catégorie cible dans ce message (avec la configuration du script pour les catégories cibles autorisées). Et d’ailleurs, les étiquettes.

3 « J'aime »

C’est faisable, mais rien de tel n’existe pour le moment.

1 « J'aime »

Bonjour, je ne comprends pas le cas d’utilisation de ce déclencheur. Il semble pouvoir envoyer un message privé, mais à qui ? Étant donné qu’un wiki peut être modifié par plusieurs utilisateurs. Merci.

Vous décidez dans l’interface utilisateur qui va recevoir le message privé.

1 « J'aime »

Existe-t-il un moyen de créer un script personnalisé ?

Ce sujet concerne la recherche d’un moyen de faire en sorte que les MP nécessitent une modération.

Donc, j’imagine

  • Déclencher la création de MP
  • Signalement automatique pour examen.

Je crois que oui :

Bien que cela nécessite quelques compétences en développement.

4 « J'aime »

C’est assez cool. Imaginez que l’OP du sujet que j’ai lié pourrait envisager de sponsoriser un script en fonction de la force avec laquelle ils ont besoin de cette fonctionnalité.

Merci Jammy pour votre réponse rapide. Comme toujours, une mine de connaissances.

2 « J'aime »

Salut, je ne comprends pas comment cela fonctionne. J’ai un champ utilisateur personnalisé qui peut prendre deux valeurs : Oui ou Non (liste déroulante). Mais lors de la création de l’automatisation, on me demande uniquement le nom du champ personnalisé, pas sa valeur. Comment puis-je déclencher l’automatisation pour ajouter cet utilisateur au groupe si je ne peux pas tester la valeur du champ personnalisé ? Merci.

La valeur du champ personnalisé doit correspondre au nom du groupe. Ainsi, si votre question est « que préférez-vous ? » et que vos réponses sont « chiens » et « chats », les noms complets des groupes doivent être « chiens » et « chats ». Vous ne pouvez pas les appeler « amoureux des chiens » et « amoureux des chats ».

Il y a un indice dans le guide lié

mais je n’avais pas compris au début non plus.

1 « J'aime »

Ok, je comprends maintenant, donc mon cas d’utilisation n’est pas possible : avoir un champ personnalisé auquel on peut répondre Oui ou Non car le nom du groupe doit être Oui ou Non… :roll_eyes:

1 « J'aime »

Puis-je « Étiqueter automatiquement les publications » en fonction des mots-clés du titre ou du corps de la publication ? Il semble qu’il ne puisse étiqueter automatiquement que des éléments basés sur le groupe ou la catégorie, ce qui n’est pas très utile dans mon cas.