# Discourse-automatisering - Vertrouwensniveau wijzigingen en beschikbaar op hosting?

**URL:** https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303
**Category:** Feature
**Tags:** automation, completed
**Created:** [16 februari 2022 om 01:42 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303 "2022-02-16T01:42:46Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [16 februari 2022 om 01:42 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/1 "2022-02-16T01:42:46Z")

</div>

Hey, Everyone,

Some quick questions:

1. Can discourse-automation trigger an action based on someone’s Trust Level changing For example, I would like an automation to trigger when someone hits Trust Level 2.

2. Can the plugin trigger external events? E.g. can it send an email or integrate with a Zapier integration?

3. Is there a way to get this plugin included on Discourse’s hosting service?

cc/ @j.jaffeux

Thanks!

---

<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: [16 februari 2022 om 07:33 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/3 "2022-02-16T07:33:01Z")

</div>

Can you describe the problem you’re trying to solve rather than your solution? What are you trying to do?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [16 februari 2022 om 09:28 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/5 "2022-02-16T09:28:04Z")

</div>

Hi @jonobacon

> [@jonobacon](#):
>
> Can discourse-automation trigger an action based on someone’s Trust Level changing For example, I would like an automation to trigger when someone hits Trust Level 2.

Yes it’s already possible.

> [@jonobacon](#):
>
> - Can the plugin trigger external events? E.g. can it send an email or integrate with a Zapier integration?

It doesn’t ATM but a Zapier integration would probably be a good idea and something easy to do.

> [@jonobacon](#):
>
> Is there a way to get this plugin included on Discourse’s hosting service?

We are working on this, so hopefully rather soon.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [16 februari 2022 om 13:12 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/6 "2022-02-16T13:12:35Z")

</div>

> [@j.jaffeux](#):
>
> It doesn’t ATM but a Zapier integration would probably be a good idea and something easy to do.

I actually worked on it today because I think this is a very important feature to have:

[https://github.com/discourse/discourse-automation/pull/71](https://github.com/discourse/discourse-automation/pull/71)

It should be available in the next days. For now it will be available to use with `user_promoted` and `user_added_to_group` scripts.

---

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [16 februari 2022 om 17:20 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/7 "2022-02-16T17:20:22Z")

</div>

> [@pfaffman](#):
>
> Can you describe the problem you’re trying to solve rather than your solution? What are you trying to do?

I like to use the Trust Levels as a means to trigger recognition. For example, when someone hits Trust Level 2, this would happen:

- A moderator is notified so they can send the person a personal thank-you DM.
- An email is sent to them thanking them for their participation.
- A social media message is sent thanking them for their participation.

Make sense?

> [@j.jaffeux](#):
>
> I actually worked on it today because I think this is a very important feature to have:
> 
> [FEATURE: adds support for zapier webhook script by jjaffeux · Pull Request #71 · discourse/discourse-automation · GitHub](https://github.com/discourse/discourse-automation/pull/71)

This is awesome, @j.jaffeux - thanks for your interest in working on this! 🤟

I think Zapier integration will open the doors to so many different things given the broad variety of platforms Zapier supports.

Thrilled to hear that `discourse-automation` may be coming to the hosting plans, any thoughts on when that might viably be? I am running a [training course on launching a Discourse community in 12 weeks](https://pages.jonobacon.com/community-masterclass) and Discourse hosting is included, would love to be able to cover `discourse-automation` in the course with the Zapier integration if possible.

Thanks!

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [16 februari 2022 om 17:45 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/9 "2022-02-16T17:45:31Z")

</div>

> [@jonobacon](#):
>
> For example, when someone hits Trust Level 2, this would happen:
> 
> - A moderator is notified so they can send the person a personal thank-you DM.

You already get a DM for reaching a new trust level, maybe you customise the text, instead of sending a second one. Usually you are also notified via e-mail about a DM, so it could become a little too much then.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [16 februari 2022 om 21:47 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/14 "2022-02-16T21:47:29Z")

</div>

> [@jonobacon](#):
>
> Thrilled to hear that `discourse-automation` may be coming to the hosting plans, any thoughts on when that might viably be?

We are aiming to have things ready by March. There are a lot of moving parts with this plugin so we have been careful not to rush things out too quickly.

> [@jonobacon](#):
>
> I am running a [training course on launching a Discourse community in 12 weeks](https://pages.jonobacon.com/community-masterclass) and Discourse hosting is included, would love to be able to cover `discourse-automation` in the course with the Zapier integration if possible.

That sounds amazing! One thing you’ll want to note is that `discourse-automation` will be limited to our Business and Enterprise tier hosting plans. This will be reflected on our website once it has been added to our hosting, but I just wanted to give you a heads up in case you are already starting to plan things out.

---

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [16 februari 2022 om 23:58 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/15 "2022-02-16T23:58:11Z")

</div>

> [@tshenry](#):
>
> We are aiming to have things ready by March. There are a lot of moving parts with this plugin so we have been careful not to rush things out too quickly.

Awesome, you rock. Thanks!

> [@tshenry](#):
>
> That sounds amazing! One thing you’ll want to note is that `discourse-automation` will be limited to our Business and Enterprise tier hosting plans. This will be reflected on our website once it has been added to our hosting, but I just wanted to give you a heads up in case you are already starting to plan things out.

Aha! Great to know. Thanks!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [22 februari 2022 om 11:00 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/16 "2022-02-22T11:00:53Z")

</div>

I thought this could be so useful that I actually added `user_promoted` event to our webhooks.

You will now have access to this event when creating a webhook:

 ![Screenshot 2022-02-22 at 11.59.07](https://global.discourse-cdn.com/meta/original/3X/7/e/7e9b55b2d1e86e4aae42ac2f45154de81e67cc40.png)

Which would then show something like this in your webhooks list:

 ![Screenshot 2022-02-22 at 11.58.21](https://global.discourse-cdn.com/meta/original/3X/0/b/0b4f6d289e1c8b9b32b8c74a8d02b449455126d1.png)

You won’t need discourse-automation for this anymore, and it’s available for everyone (on main branch for now).

---

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [24 februari 2022 om 20:05 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/17 "2022-02-24T20:05:45Z")

</div>

> [@j.jaffeux](#):
>
> I thought this could be so useful that I actually added `user_promoted` event to our webhooks.

Wow, this is awesome. Thanks!

I am rather embarrassed to admit I have never used webhooks before, so forgive my ignorance, but will this enable me to create an individual webhook for a specific trust level change (e.g. someone goes from TL1 to TL2)?

Thanks!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [24 februari 2022 om 20:16 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/18 "2022-02-24T20:16:32Z")

</div>

Dont be embarassed, it’s probably our fault to not emphasize them enough.

Sadly no, you can’t decide this from the webhook, this is one area where automation will shine as it will give more control. However, you can check the trust level in Zapier and do something only if trust\_level = 3 for example, so far you will have no info on previous trust\_level, I could look at this but Im not sure that’s necessary, reaching a specific TL should be good for most use cases no?

---

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [24 februari 2022 om 20:22 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/19 "2022-02-24T20:22:00Z")

</div>

> [@j.jaffeux](#):
>
> Sadly no, you can’t decide this from the webhook, this is one area where automation will shine as it will give more control. However, you can check the trust level in Zapier and do something only if trust\_level = 3 for example, so far you will have no info on previous trust\_level, I could look at this but Im not sure that’s necessary, reaching a specific TL should be good for most use cases no?

Ahhh, I see. So when the webhook fires, the new TL is passed, is that correct?

If so, yes, I think I can just use Zapier to create a condition based on the data. 🙂

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [24 februari 2022 om 21:17 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/20 "2022-02-24T21:17:00Z")

</div>

When the webhook is fired you get the whole user data using (UserSerializer), and yes it includes trust\_level.

---

<div class="post-metadata">

### Author: ![jonobacon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonobacon/32/169578_2.png) [@jonobacon](https://meta.discourse.org/u/jonobacon)
#### Post date: [24 februari 2022 om 21:36 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/21 "2022-02-24T21:36:05Z")

</div>

Awesome, thanks! Appreciate the great work!

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [9 maart 2022 om 08:46 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/22 "2022-03-09T08:46:17Z")

</div>

> [@jonobacon](#):
>
> Is there a way to get this plugin included on Discourse’s hosting service?

And it is live on our hosting plans:

> **[Automation](https://www.discourse.org/plugins/automation.html)**
>
> Automate complex workflows with predefined scripts and triggers

Thank you for pushing us on this @jonobacon 🤗

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [16 maart 2022 om 07:00 UTC](https://meta.discourse.org/t/discourse-automation-trust-level-changes-and-available-on-hosting/218303/25 "2022-03-16T07:00:04Z")

</div>

This topic was automatically closed after 6 days. New replies are no longer allowed.
