diff --git a/docs/capabilities/server/global-triggers.mdx b/docs/capabilities/server/global-triggers.mdx
new file mode 100644
index 00000000..1841611c
--- /dev/null
+++ b/docs/capabilities/server/global-triggers.mdx
@@ -0,0 +1,98 @@
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
+# Global Triggers
+
+Global triggers let your app respond to Reddit events even when those events happen outside the subreddit where your app is installed.
+
+Currently, Devvit supports one global trigger:
+
+- `onMentionInCommentCreate`
+
+## Example usage
+
+Configure a global trigger the same way you configure other trigger events: declare the event in `devvit.json`, map it to an internal endpoint, then handle requests at that endpoint.
+
+```json
+"triggers": {
+ "onMentionInCommentCreate": "/internal/triggers/on-mention-in-comment-create"
+}
+```
+
+Then handle the global trigger event in your server:
+
+
+
+
+```tsx title="server/index.ts"
+import type {
+ OnMentionInCommentCreateRequest,
+ TriggerResponse,
+} from '@devvit/web/shared';
+
+app.post('/internal/triggers/on-mention-in-comment-create', async (c) => {
+ console.log('Handle event for on-mention-in-comment-create!');
+ const input = await c.req.json();
+ const commentId = input.comment?.id;
+ console.log('Comment ID:', commentId);
+ return c.json({ status: 'ok' });
+});
+```
+
+
+
+
+```tsx title="server/index.ts"
+import type {
+ OnMentionInCommentCreateRequest,
+ TriggerResponse,
+} from '@devvit/web/shared';
+
+const router = express.Router();
+
+// ..
+
+router.post(
+ "/internal/triggers/on-mention-in-comment-create",
+ async (req, res) => {
+ console.log("Handle event for on-mention-in-comment-create!");
+ const commentId = req.body.comment?.id;
+ console.log("Comment ID:", commentId);
+ res.status(200).json({ status: "ok" });
+ }
+);
+```
+
+
+
+
+## Playtesting global triggers
+
+During development, you can playtest global trigger events only when the triggering event occurs in the playtest subreddit. Events from other subreddits do not invoke your app while you are playtesting.
+
+## Responding to global trigger events across Reddit
+
+To receive global trigger events across Reddit, your app version must:
+
+- Be published and approved.
+- Be installed to the app's profile subreddit.
+
+## Profile subreddit installations
+
+Some app versions can be installed to the app's profile subreddit. An app version is eligible when it has been approved and uses at least one global trigger event.
+
+Eligible app versions appear in the **Profile installation** section of your app's settings page at [developers.reddit.com/apps/your-app-slug](https://developers.reddit.com/apps/your-app-slug).
+
+## Restrictions
+
+Apps do not receive global trigger events when:
+
+- The event originates from a subreddit where the app is banned.
+- The event does not pass safety checks, such as checks for illegal content. Events may contain NSFW content.
diff --git a/sidebars.ts b/sidebars.ts
index c7120e57..4cc5aed5 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -157,7 +157,24 @@ const sidebars: SidebarsConfig = {
{
type: "category",
label: "Automation & Triggers",
- items: ["capabilities/server/scheduler", "capabilities/server/triggers"],
+ items: [
+ "capabilities/server/scheduler",
+ {
+ type: "category",
+ label: "Triggers",
+ link: {
+ type: "doc",
+ id: "capabilities/server/triggers",
+ },
+ items: [
+ {
+ type: "doc",
+ id: "capabilities/server/global-triggers",
+ label: "Global Triggers",
+ },
+ ],
+ },
+ ],
},
{
type: "doc",
diff --git a/versioned_docs/version-0.13/capabilities/server/global-triggers.mdx b/versioned_docs/version-0.13/capabilities/server/global-triggers.mdx
new file mode 100644
index 00000000..1841611c
--- /dev/null
+++ b/versioned_docs/version-0.13/capabilities/server/global-triggers.mdx
@@ -0,0 +1,98 @@
+import Tabs from "@theme/Tabs";
+import TabItem from "@theme/TabItem";
+
+# Global Triggers
+
+Global triggers let your app respond to Reddit events even when those events happen outside the subreddit where your app is installed.
+
+Currently, Devvit supports one global trigger:
+
+- `onMentionInCommentCreate`
+
+## Example usage
+
+Configure a global trigger the same way you configure other trigger events: declare the event in `devvit.json`, map it to an internal endpoint, then handle requests at that endpoint.
+
+```json
+"triggers": {
+ "onMentionInCommentCreate": "/internal/triggers/on-mention-in-comment-create"
+}
+```
+
+Then handle the global trigger event in your server:
+
+
+
+
+```tsx title="server/index.ts"
+import type {
+ OnMentionInCommentCreateRequest,
+ TriggerResponse,
+} from '@devvit/web/shared';
+
+app.post('/internal/triggers/on-mention-in-comment-create', async (c) => {
+ console.log('Handle event for on-mention-in-comment-create!');
+ const input = await c.req.json();
+ const commentId = input.comment?.id;
+ console.log('Comment ID:', commentId);
+ return c.json({ status: 'ok' });
+});
+```
+
+
+
+
+```tsx title="server/index.ts"
+import type {
+ OnMentionInCommentCreateRequest,
+ TriggerResponse,
+} from '@devvit/web/shared';
+
+const router = express.Router();
+
+// ..
+
+router.post(
+ "/internal/triggers/on-mention-in-comment-create",
+ async (req, res) => {
+ console.log("Handle event for on-mention-in-comment-create!");
+ const commentId = req.body.comment?.id;
+ console.log("Comment ID:", commentId);
+ res.status(200).json({ status: "ok" });
+ }
+);
+```
+
+
+
+
+## Playtesting global triggers
+
+During development, you can playtest global trigger events only when the triggering event occurs in the playtest subreddit. Events from other subreddits do not invoke your app while you are playtesting.
+
+## Responding to global trigger events across Reddit
+
+To receive global trigger events across Reddit, your app version must:
+
+- Be published and approved.
+- Be installed to the app's profile subreddit.
+
+## Profile subreddit installations
+
+Some app versions can be installed to the app's profile subreddit. An app version is eligible when it has been approved and uses at least one global trigger event.
+
+Eligible app versions appear in the **Profile installation** section of your app's settings page at [developers.reddit.com/apps/your-app-slug](https://developers.reddit.com/apps/your-app-slug).
+
+## Restrictions
+
+Apps do not receive global trigger events when:
+
+- The event originates from a subreddit where the app is banned.
+- The event does not pass safety checks, such as checks for illegal content. Events may contain NSFW content.
diff --git a/versioned_docs/version-0.13/capabilities/server/triggers.mdx b/versioned_docs/version-0.13/capabilities/server/triggers.mdx
index 17255ff4..07fbf4f6 100644
--- a/versioned_docs/version-0.13/capabilities/server/triggers.mdx
+++ b/versioned_docs/version-0.13/capabilities/server/triggers.mdx
@@ -32,6 +32,7 @@ Event triggers let your app automatically respond to a user's or moderator's act
- `onModMail`
- `onAutomoderatorFilterPost`
- `onAutomoderatorFilterComment`
+- `onMentionInCommentCreate`
A full list of events and their payloads can be found in the [EventTypes documentation](../../api/public-api/@devvit/namespaces/EventTypes/). For more details on Mod specific actions, see [ModActions](../../api/redditapi/models/interfaces/ModAction) and [ModMail](../../api/public-api/type-aliases/ModMailDefinition).
diff --git a/versioned_sidebars/version-0.13-sidebars.json b/versioned_sidebars/version-0.13-sidebars.json
index c8ac6cf7..8da6ce1a 100644
--- a/versioned_sidebars/version-0.13-sidebars.json
+++ b/versioned_sidebars/version-0.13-sidebars.json
@@ -147,7 +147,21 @@
"label": "Automation & Triggers",
"items": [
"capabilities/server/scheduler",
- "capabilities/server/triggers"
+ {
+ "type": "category",
+ "label": "Triggers",
+ "link": {
+ "type": "doc",
+ "id": "capabilities/server/triggers"
+ },
+ "items": [
+ {
+ "type": "doc",
+ "id": "capabilities/server/global-triggers",
+ "label": "Global Triggers"
+ }
+ ]
+ }
]
},
{