# Webhooks for private messages - building an onboarding bot

**URL:** https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756
**Category:** Development
**Tags:** webhooks
**Created:** [November 30, 2019, 5:45pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756 "2019-11-30T17:45:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Krischan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/krischan/32/47290_2.png) [@Krischan](https://meta.discourse.org/u/Krischan)
#### Post date: [November 30, 2019, 5:45pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/1 "2019-11-30T17:45:06Z")

</div>

I’m currently building an onboarding bot using the api, private messages and webhooks. The bot will interview new users and publish the interview afterwards for the community to read and get to know the newbie this way. Would it be possible to implement a webhook that gets triggered by personal messages only? Since pms can’t be tagged, I currently need to trigger a webhook whenever any topic is created and changed - which reduces my „trigger budget“ of the bot saas rapidly. Thanks for your feedback!

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [November 30, 2019, 6:25pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/2 "2019-11-30T18:25:24Z")

</div>

The onboarding bot you are creating is cool! Please let us know how it goes and share if you can.

> [@Krischan](#):
>
> Since pms can’t be tagged

Not sure about the rest of your request, but this is not true. You can allow staff to tag PMs via an admin setting.

 ![55 PM](https://global.discourse-cdn.com/meta/original/3X/e/9/e92bdce73b8901c4fd699f666ab3b5216f64e36a.png)

Also I have a bulk pm method I use to send PMs via the API, and it is possible to add tags.

> [@Tickets Plugin tickets](https://meta.discourse.org/t/tickets-plugin/97914/58):
>
> Looks to me like you need to enable the plugin. Are you sure you followed all the steps correctly to install it? It’s alot of fun! Here’s a screenshot to get you on your way. Note the is\_ticket to enable the ticket and that you need a tags[] for each tag you want to add. Also, note that to assign tickets via the API you need to do a follow-up call which I have not figured out how to do via postman. I also found this useful when learning how to use the API: [Reverse engineer the Di…](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![Krischan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/krischan/32/47290_2.png) [@Krischan](https://meta.discourse.org/u/Krischan)
#### Post date: [November 30, 2019, 10:25pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/3 "2019-11-30T22:25:40Z")

</div>

Thanks, I got it working this way!

> [@tobiaseigen](#):
>
> Please let us know how it goes and share if you can.

Would love to share, but I guess it’s not practicable to replicate since I’m not a coder, but a terrible hacker. 😉

I let Discourse fire a webhook for a user event, then use Zapier to filter for a user creation event

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/1/a19d66f37386eb652925f8b115c75be77bd4769f.png)

Then I trigger another webhook, this time in Zapier to get the Bot saas [flowxo.com](http://flowxo.com) going which asks a Google spreadsheet for the messages to send to the user and stores the progress in another spreadsheet. Your hint helped to get rid off Zapier for the rest of the interview process.

In the end Flowxo puts all questions and answers in one string, posts it in the thread and turns the post into a wiki, so that the user can make final changes. If he then answers with “ready”, the wiki post gets replicated in a public thread together with a link to the profile of the new user. He gets a nice badge and that’s it.

We will test this next week with quite a few users who are on our “waiting list”. I will report back, if the conversion is good. Maybe it’s worth becoming a plugin…

---

<div class="post-metadata">

### Author: ![Krischan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/krischan/32/47290_2.png) [@Krischan](https://meta.discourse.org/u/Krischan)
#### Post date: [December 5, 2019, 7:15am UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/4 "2019-12-05T07:15:41Z")

</div>

So here’s the funnel after one day:

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/b/9b510fd51955d2be7a1a8a83ad7e9a800467fc95.png)

We’re very happy with the results.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 10, 2023, 11:51pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/5 "2023-09-10T23:51:12Z")

</div>



---

<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: [December 14, 2023, 12:02pm UTC](https://meta.discourse.org/t/webhooks-for-private-messages-building-an-onboarding-bot/134756/6 "2023-12-14T12:02:57Z")

</div>


