# Are automatic badge triggers still available?

**URL:** https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284
**Category:** Support
**Tags:** sql-triggered-badge
**Created:** [September 18, 2016, 3:05am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284 "2016-09-18T03:05:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jsonnull](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsonnull/32/121552_2.png) [@jsonnull](https://meta.discourse.org/u/jsonnull)
#### Post date: [September 18, 2016, 3:05am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/1 "2016-09-18T03:05:11Z")

</div>

Hi, I’m trying to create a badge that is automatically granted, and I can’t find where to enter the SQL query while editing the badge. Is this somewhere else? Has the feature been removed?

Any help is appreciated, of course. Thanks!

---

<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: [September 18, 2016, 3:09am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/2 "2016-09-18T03:09:58Z")

</div>

yeah - you have to enable them from the command line first, though. see this topic.

> [@Enable Badge SQL](https://meta.discourse.org/t/badge-sql-can-no-longer-be-edited-by-default/47894):
>
> bookmark This guide explains how to enable Badge SQL in Discourse and discusses the associated security and performance risks. person_raising_hand Required user level: Administrator warning Enabling Badge SQL can pose security and performance risks. To maintain security and performance integrity, as of Discourse 1.6, the ability for administrators to edit badge SQL directly is disabled by default. The two primary concerns around enabling Badge SQL are: Security: Allowing direct SQL…

---

<div class="post-metadata">

### Author: ![jsonnull](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsonnull/32/121552_2.png) [@jsonnull](https://meta.discourse.org/u/jsonnull)
#### Post date: [September 18, 2016, 3:12am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/3 "2016-09-18T03:12:50Z")

</div>

I see, thank you for sharing.

Is this still the best way to grant custom badges automatically?

Also, quick bit of feedback: I was searching for variations on “badge trigger” since a lot of the prior writing refers to triggers, but that post doesn’t have this so it didn’t show up in my searches. Maybe this will help somebody else.

---

<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: [March 7, 2019, 10:55am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/4 "2019-03-07T10:55:38Z")

</div>



---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 12, 2019, 12:59am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/5 "2019-03-12T00:59:06Z")

</div>

> [@jsonnull](#):
>
> Is this still the best way to grant custom badges automatically?

This remains the most efficient and timely way of automatically assigning badges based on a particular action on the forum.

If you are happy with a 24 hour delay you can just bypass thinking about triggers and just use a badge query.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 12, 2019, 12:59am UTC](https://meta.discourse.org/t/are-automatic-badge-triggers-still-available/50284/6 "2019-03-12T00:59:08Z")

</div>


