Automatización 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 Me gusta
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?

Solo para que lo sepas, he actualizado el OP con una tabla de todas las automatizaciones existentes y sus desencadenantes correspondientes. :+1:

(También espero añadir más guías, ya que la de ‘Añadir usuario a grupo…’ parece un poco solitaria por sí sola :slight_smile:)


Se han añadido un par de tutoriales más para Setting up the ‘Append last edited by’ automation y Setting up the 'Append last checked by' automation. :tada:
Y un nuevo script, Membresía de grupo de usuarios a través de insignias. :partying_face: Ese está recién salido del horno, así que si lo pruebas, dinos cómo te va. :+1:

11 Me gusta

Ahora me siento muy, muy… no estúpido, pero casi. ¿Dónde puedo crear automatizaciones? En Complementos, solo puedo habilitar o deshabilitar Automatización.

3 Me gusta

Después de habilitar el plugin, deberías ver un nuevo elemento aquí:

Es posible que necesites actualizar la página para verlo.

3 Me gusta

Y ahora me siento muy estúpido :man_facepalming:

Gracias.

1 me gusta

Yo también me he quedado atascado en ese antes :slight_smile:

Las respuestas a este tema probablemente deberían configurarse para eliminarse automáticamente después de 30 días. Al menos esta respuesta debería.

2 Me gusta

Ya no hacemos eso para los temas de plugins official. Se ha perdido demasiada buena información en los temporizadores de los temas. Ahora los curamos manualmente y dividimos cualquier discusión significativa en temas etiquetados por separado (además de animar a las personas a iniciar temas separados desde el principio). :+1:

18 Me gusta

Se dividió una publicación en un nuevo tema: Automatización para cerrar temas resueltos y publicar una respuesta de plantilla

:information_source: Discourse Automation ahora se ha incluido en el núcleo de Discourse, por lo que este plugin ya no necesitará instalarse por separado. :partying_face:

:discourse2: ¿Alojado por nosotros? Este cambio no te afectará de ninguna manera. :+1: Si estás en los planes Business o Enterprise, puedes seguir disfrutando de este plugin y no preocuparte por nada.

6 Me gusta

¿Existe un script de automatización que pueda cambiar la categoría? Me gustaría usarlo para crear un sistema de “Publicación programada” más flexible.

Imagino que el script:

  • se ejecutaría periódicamente y
  • buscaría temas en una categoría determinada que tengan algún marcador en una respuesta (como, marcado como resuelto o la respuesta contiene cierto texto, como “PUBLICAR”).
  • Si la fecha de esa respuesta (o el estado de “resuelto”) es anterior a un desplazamiento determinado (como, ayer o una semana),
  • eliminaría todas las respuestas
  • movería a la categoría dada
  • opcionalmente, añadiría etiquetas configurables.

Una versión más sofisticada podría buscar una fecha/hora en la respuesta desencadenante y publicar si es ahora después de esa fecha/hora.

También podría buscar la categoría de destino en esa publicación (con configuración de script para categorías de destino permitidas). Y, para el caso, etiquetas.

3 Me gusta

Esto es factible, pero ahora mismo no existe nada parecido.

1 me gusta

Hola, no entiendo el caso de uso de este disparador. Parece que puede enviar un mensaje privado, ¿pero a quién? Dado que una wiki puede ser editada por varios usuarios. Gracias.

Tú decides en la interfaz de usuario quién va a recibir el mensaje privado.

1 me gusta

¿Hay alguna forma de crear un script personalizado?

Este tema, la persona busca una forma de que los mensajes privados requieran moderación.

Así que me imagino

  • Disparador Crear PM
  • Marcado automático para revisión.

Creo que sí:

Aunque requeriría algunas habilidades de desarrollo.

4 Me gusta

Eso es bastante genial. Imagina que el Op en el tema que enlacé podría considerar patrocinar un script dependiendo de la urgencia que necesiten esa funcionalidad.

Gracias Jammy por la rápida respuesta. Como siempre, una gran fuente de conocimiento.

2 Me gusta

Hola, no entiendo cómo funciona esto. Tengo un campo de usuario personalizado que puede tomar dos valores: Sí o No (desplegable). Pero al crear la automatización, solo se me pide el nombre del campo personalizado, no su valor. ¿Cómo puedo activar la automatización para añadir a este usuario al grupo si no puedo probar el valor del campo personalizado? Gracias.

El valor del campo personalizado tiene que coincidir con el nombre del grupo. Así que si tu pregunta es “¿qué prefieres?” y tus respuestas son “perros” y “gatos”, los nombres completos de los grupos deben ser “perros” y “gatos”. No puedes llamarlos “amantes de los perros” y “amantes de los gatos”.

Hay una pista en la guía enlazada

pero yo tampoco lo entendí al principio.

1 me gusta

Ok, lo entiendo ahora, así que mi caso de uso no es posible: tener un campo personalizado al que puedas responder Sí o No porque el nombre del grupo debería ser Sí o No… :roll_eyes:

1 me gusta

¿Puedo “Etiquetar automáticamente publicaciones” basándome en palabras clave dentro de la publicación o el título de la publicación? Parece que solo puede etiquetar automáticamente cosas basándose en el grupo o la categoría, lo cual no es muy útil en mi caso.