# Workspace Action Triggers

<figure><img src="/files/WJanltXBJpOQiBI2np27" alt=""><figcaption></figcaption></figure>

### Creating a Trigger

1. **Open Your Workspace**\
   Log in to the Panora Dashboard and select your workspace. Navigate to the **Action Triggers** tab from the sidebar.
2. **Create a New Trigger**\
   Click **+ New Trigger** and enter the required details, including the trigger name and description.
3. **Configure Trigger Settings**\
   Customize settings such as:
   * Announcement channels
   * Embed formatting
   * Message templates
   * Timing features
   * Custom fields
4. **Using the Trigger Command**\
   In your Discord server, type the command for your trigger:\
   `!triggerName` (replace with your trigger’s name).\
   This will execute the trigger according to your configured settings.

***

### Configuration Breakdown

#### Trigger Parameters

| Parameter                  | Type    | Description                                 | Example                                          |
| -------------------------- | ------- | ------------------------------------------- | ------------------------------------------------ |
| **Trigger Name**           | string  | Name used to activate the trigger           | `training`                                       |
| **Description**            | string  | Message template executed when triggered    | `Welcome to {server}! Event starts in {channel}` |
| **Allowed Roles**          | array   | Roles allowed to execute the trigger        | `@Executive, @Management`                        |
| **Channel ID**             | number  | Target Discord channel for messages         | `#announcements`                                 |
| **Embed**                  | boolean | Enable or disable embedded formatting       | `true/false`                                     |
| **Embed Colour**           | string  | Border color for the embed                  | `24bef9`                                         |
| **Embed Title**            | string  | Optional title for the embed                | `Training Announcement`                          |
| **Embed URL**              | string  | Clickable link for the embed title          | `https://discord.gg/...`                         |
| **Embed Author Name/Icon** | string  | Name and icon displayed in the embed header | `Panora Management Team`                         |
| **Embed Image/Thumbnail**  | string  | Optional images for the embed               | URL                                              |
| **Embed Footer Name/Icon** | string  | Footer text and icon                        | `Panora Bot System`                              |
| **Embed Footer Timestamp** | boolean | Toggle timestamp in footer                  | `true/false`                                     |
| **Ping**                   | string  | Who should be pinged, supports `{args1}`    | `@Events, {args1}`                               |
| **Trigger Delete**         | boolean | Auto-delete the command message             | `true/false`                                     |
| **Message Delete**         | number  | Auto-delete bot’s response after X seconds  | `30`                                             |
| **Cooldown**               | number  | Prevent repeated usage per user             | `60` (seconds)                                   |

***

#### Embed Fields

You can add up to **5 custom fields** to embeds:

| Field        | Type    | Description                                     |
| ------------ | ------- | ----------------------------------------------- |
| Field Name   | string  | Title/header of the field                       |
| Field Value  | string  | Body/content, supports variables and arguments  |
| Field Inline | boolean | Display inline with other fields (`true/false`) |

***

#### Variables & Arguments

Use variables and arguments to create dynamic, personalized messages.

**Common Variables:**

<table><thead><tr><th width="248">Variable</th><th>Description</th></tr></thead><tbody><tr><td><code>{user}</code></td><td>Mentions the user executing the command</td></tr><tr><td><code>{avatar}</code></td><td>Displays user avatar URL</td></tr><tr><td><code>{username}</code></td><td>Displays username</td></tr><tr><td><code>{server}</code></td><td>Server name</td></tr><tr><td><code>{channel}</code></td><td>Mentions current channel</td></tr><tr><td><code>{&#x26;role}</code></td><td>Dynamically mention a role</td></tr><tr><td><code>{#channel}</code></td><td>Dynamically mention a channel</td></tr><tr><td><code>{everyone}</code></td><td>Mentions @everyone</td></tr><tr><td><code>{here}</code></td><td>Mentions @here</td></tr></tbody></table>

**Arguments:**\
Insert `{args1}`, `{args2}`, etc., to reference user input dynamically. Arguments work in all fields including titles, descriptions, and custom embed fields.

> Example: Set **Ping** to `{args1}` to ping a dynamic target instead of a pre-configured role.

***

### Trigger Logic & Execution

* **Role-Based Access:** Only users with Allowed Roles can execute the trigger.
* **Channel Targeting:** Messages are sent to the configured channel or where the command is used.
* **Embed Support:** Enable for visually rich messages with custom formatting.
* **Cooldown Protection:** Prevent spam by setting per-user cooldowns.

***

### Timing Features

* **Auto-Delete Trigger:** Remove the user’s command message after execution.
* **Auto-Delete Response:** Remove the bot’s response after X seconds.
* **Cooldown System:** Prevent repeated triggering by the same user.

***

### Error Handling

* Misconfigured triggers return a friendly error message.
* Role or channel lookup failures retry up to three times.
* Cooldown violations display the remaining wait time.

***

### Example Trigger

**Training Session Announcement:**

```
!training
```

```
We're excited to announce that there is currently a training, hosted by our wonderful management member {user}. We warmly invite you to join us and obtain a Staff Rank!

Session Host: {user}
Co-Host: {args1}
Server: {args2}

Signed,
{user}
Panora Talent Team
```

**Dynamic Ping Example:**\
Set Ping to `{args1}`, then run:\
`!training @EventTeam`\
→ This pings @EventTeam dynamically instead of a static role.

***

### Summary

Action Triggers in Panora provide flexible, automated, and dynamic messaging for your Discord server. Use triggers for events, announcements, reminders, or any structured messages, with full control over embeds, variables, role permissions, and timing features.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panora.cc/workspaces/overview/action-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
