# Notify user when certain words appear in posts

**URL:** https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236
**Category:** Feature
**Created:** [27 juni 2017 om 15:48 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236 "2017-06-27T15:48:34Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![ked](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ked/32/64837_2.png) [@ked](https://meta.discourse.org/u/ked)
#### Post date: [27 juni 2017 om 15:48 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/1 "2017-06-27T15:48:34Z")

</div>

Use Case: simply saying thank you to someone who has posted on a topic that was missing or lacking within a forum. As in, “hey, thanks for your insightful post on **Mars**. We’ve been hoping someone would shed some light on this subject here at the Planets Forum”

---

<div class="post-metadata">

### Author: ![ked](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ked/32/64837_2.png) [@ked](https://meta.discourse.org/u/ked)
#### Post date: [27 juni 2017 om 18:20 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/2 "2017-06-27T18:20:15Z")

</div>

As to the Actions that could be initiated upon a word/phrase match, what are the reasonable possibilities?

- send an email notification to Admin(s)?
- record the match in a CSV file (timestamp, match phrase, URL of the post)
- Other?

Also, is the ability to establish “watch words” for Admins only, or possibly other TL’s?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [27 juni 2017 om 19:07 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/3 "2017-06-27T19:07:42Z")

</div>

The actions being considered right now are:

- Block the post
- Flag as inappropriate
- Require approval for the post

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [27 juni 2017 om 21:45 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/4 "2017-06-27T21:45:50Z")

</div>

I think what @ked wants to know is would it be hard to also just give a notification when such posts occurred? Or do you think that having the messages flagged is just as effective? My concern is that we don’t want messages with “good” watched words in them to be hidden or otherwise marked as “bad,” but instead be able to take action with that person (“thanks for asking about the thing I care about, I can help”).

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [27 juni 2017 om 21:54 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/5 "2017-06-27T21:54:53Z")

</div>

So you want a global site setting (vs a per-user setting) to send a notification to someone (moderators? admins?) when certain “good” words appear in posts?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [27 juni 2017 om 22:01 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/6 "2017-06-27T22:01:36Z")

</div>

I thought that these were all global settings, so I thought that the idea was that this was for admins only.

But yes, the “keyword alerts” feature that you describe is what @ked is looking for. As far as he’s concerned, having it available only to admins (read: him) would be sufficient.

I think the question is that if what he wants is “keyword alerts” would it be possible to coerce the block/flag/require approval scheme that you’re suggesting to provide admin-only keyword alerts?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [27 juni 2017 om 23:08 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/7 "2017-06-27T23:08:40Z")

</div>

As covered in the other topic, I think this approach is quite flawed.

A better approach is **saved searches** , as in

1. Do this search (ordered by date)
2. When there are new matches in the search..
3. PM me a summary (if many matches)

This gives you complete flexibility as you have the entire power of the search engine, and you can determine how often it runs, etc.

Also all we need to do is store date the last search was run, and the highest (most recent) date of search match. So it’s pretty simple from a data storage perspective.

---

<div class="post-metadata">

### Author: ![ked](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ked/32/64837_2.png) [@ked](https://meta.discourse.org/u/ked)
#### Post date: [28 juni 2017 om 17:47 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/8 "2017-06-28T17:47:30Z")

</div>

Seems like a great approach to me!

A couple of possibilities/thoughts:

- a way to delete searches no longer of interest would be handy
- what would be the best way to regulate the timing of the searches?
- could there be an optional tie to the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin (assuming it’s being used of course) that could be leveraged in conjunction with this feature?
- as for the UI, I very much like the use of a column-sortable Table

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [17 juli 2017 om 10:11 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/9 "2017-07-17T10:11:46Z")

</div>

This looks like exactly what @ked is looking for. Is this feature on the timeline?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2 augustus 2017 om 00:30 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/10 "2017-08-02T00:30:09Z")

</div>

@neil is working on it now, as a plugin.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2 augustus 2017 om 00:39 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/11 "2017-08-02T00:39:55Z")

</div>

> [@codinghorror](#):
>
> A better approach is saved searches, as in
> 
> Do this search (ordered by date)  
> When there are new matches in the search…  
> PM me a summary (if many matches)

If there were a way for users to have a topic list tab for saved searches, that may also be a way to address [this feature request](https://meta.discourse.org/t/topic-list-tabs-for-user-customizeable-saved-filters/40953).

---

<div class="post-metadata">

### Author: ![awlogan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awlogan/32/62208_2.png) [@awlogan](https://meta.discourse.org/u/awlogan)
#### Post date: [5 januari 2018 om 23:28 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/12 "2018-01-05T23:28:28Z")

</div>

hi @neil, was this ever completed? I have a use case now where a member of my CISO team is responsible for answering questions on GDPR. It would be much easier for him to get a notification / PM when someone mentions it instead of me doing it for him.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [8 januari 2018 om 19:14 UTC](https://meta.discourse.org/t/notify-user-when-certain-words-appear-in-posts/65236/13 "2018-01-08T19:14:42Z")

</div>

Yes, @awlogan it was implemented in the [Saved Searches](https://github.com/discourse/discourse-saved-searches) plugin. It’s installed here on meta, so have a look in your user preferences and look in the “Saved Searches” section.
