# Webhooks on chat messages?

**URL:** https://meta.discourse.org/t/webhooks-on-chat-messages/260199
**Category:** Feature
**Tags:** chat
**Created:** [April 1, 2023, 8:53am UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199 "2023-04-01T08:53:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Olivier\_Lambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olivier_lambert/32/74807_2.png) [@Olivier\_Lambert](https://meta.discourse.org/u/Olivier_Lambert)
#### Post date: [April 1, 2023, 8:53am UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199/1 "2023-04-01T08:53:59Z")

</div>

Hello! I’ve implemented a chatbot through OpenAi & Discourse’s Webhooks.

> [@How are we all feeling about ChatGPT and other LLMs and how they'll impact forums?](https://meta.discourse.org/t/how-are-we-all-feeling-about-chatgpt-and-other-llms-and-how-theyll-impact-forums/259230/18):
>
> I run a forum that offers support for entrepreneurs. Since November, I’ve created @Robolivier, a friendly AI robot that helps users when they mention him. He also replies to every new topics once in hopes of providing the user with a satisfactory answer. I’ve added a disclaimer to each of his messages. So far, the users have been finding it amusing and useful most of the time. I plan to train him on my own interactions on the forum, we’ll see how that will go. Since it’s a paid forum, bots a…

TL;DR, I created a user called Robolivier that replies when mentionned.

I would like to have him reply to a specific channel & to direct messages.

There are no “chat messages” in the list of events sent through webhook:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/7/0/4703892fa8ac31e872bff796e8848e176fbca8f7.png)

How would I go about doing that? Is there a plugin available? Maybe a setting I’ve missed?

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [April 1, 2023, 11:18am UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199/2 "2023-04-01T11:18:07Z")

</div>

Hey there, in case you didn’t know there is [Discourse Chatbot 🤖 (supporting ChatGPT)](https://meta.discourse.org/t/discourse-chatbot-supporting-chatgpt/256652) that already works in topics/chats/PM’s.

So unless you are building your bot for educational purposes, I would just install that if I were you.

I also think that doing this through API, because you probably want to get chat history to improve your AI responses, might be possible but you might bump into some challenges (correct me if I’m wrong).

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 2, 2023, 8:59am UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199/3 "2023-04-02T08:59:42Z")

</div>

6 posts were merged into an existing topic: [Discourse Chatbot 🤖 (supporting ChatGPT)](https://meta.discourse.org/t/discourse-chatbot-supporting-chatgpt/256652/226)

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [April 1, 2023, 4:31pm UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199/7 "2023-04-01T16:31:35Z")

</div>

But it would still be nice to have a webhook for chat messages, especially since `allowed_user_api_push_urls` is now a hidden setting. If you can’t use a plugin then right now all you can do is poll for notifications right now, which is pretty suboptimal.

Is there any way a plugin can add a webhook trigger option?  
Would a PR be accepted for this?

---

<div class="post-metadata">

### Author: ![fbpbdmin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fbpbdmin/32/300893_2.png) [@fbpbdmin](https://meta.discourse.org/u/fbpbdmin)
#### Post date: [September 4, 2023, 6:29pm UTC](https://meta.discourse.org/t/webhooks-on-chat-messages/260199/8 "2023-09-04T18:29:28Z")

</div>

agree, chat webhook is a different need,
