# Workflow Triggers

Triggers determine **when** your workflow runs. Choose the trigger that matches your automation goal.

{% hint style="warning" %}
Triggers cannot be changed after creating a workflow. Make sure to select the right one for your use case.
{% endhint %}

***

### On a Schedule

Run workflows at specific times on specific days — perfect for recurring reminders, weekly updates, or standup prompts.

#### Configuration

| Setting      | Description                                                     |
| ------------ | --------------------------------------------------------------- |
| **Days**     | Select one or more days (Monday through Sunday)                 |
| **Time**     | Choose the hour (messages send shortly after the selected time) |
| **Timezone** | Select your timezone for accurate scheduling                    |

#### Available Variables

| Variable      | Description                   |
| ------------- | ----------------------------- |
| `{{channel}}` | References the target channel |

#### Example Use Cases

* Send a weekly team update every Monday at 9:00 AM
* Post daily standup reminders at 9:30 AM on weekdays
* Send end-of-week summaries every Friday at 4:00 PM

***

### User Joins Channel

Automatically trigger when someone joins one of your specified channels — ideal for onboarding, welcome messages, or channel-specific introductions.

#### Configuration

| Setting      | Description                            |
| ------------ | -------------------------------------- |
| **Channels** | Select one or more channels to monitor |

#### Available Variables

| Variable      | Description                        |
| ------------- | ---------------------------------- |
| `{{user}}`    | Mentions the user who joined       |
| `{{channel}}` | References the channel they joined |

#### Example Use Cases

* Welcome new hires when they join #new-employees
* Send channel guidelines when someone joins #support
* Introduce team norms when someone joins a project channel

#### Behavior Notes

* Triggers every time someone joins (no duplicate prevention by default)
* Use re-enrollment settings to control repeat triggers

***

### Channel Meets Criteria

Trigger workflows when you're added to new channels that match specific rules — powerful for scaling communication across dynamic or auto-created channels.

#### Configuration

| Setting          | Description                                                        |
| ---------------- | ------------------------------------------------------------------ |
| **Metric**       | What to check (e.g., Channel Name, Channel Purpose, Channel Topic) |
| **Operator**     | How to match: **Contains**, **Starts With**, **Ends With**         |
| **Value**        | The text to match against                                          |
| **Filter Logic** | **AND** (all rules must match) or **OR** (any rule can match)      |

#### Available Variables

| Variable      | Description                     |
| ------------- | ------------------------------- |
| `{{channel}}` | References the matching channel |

#### Example Use Cases

* Post project guidelines when added to channels starting with `proj-`
* Share customer success resources in channels containing `customer`
* Add onboarding info to channels ending with `-onboarding`

#### Example Configuration

> Trigger when **channel name** **starts with** `proj-`

This would match channels like `#proj-alpha`, `#proj-website-redesign`, `#proj-q1-launch`.

#### Behavior Notes

* Only triggers once per channel per workflow (duplicate prevention built-in)
* Great for workspaces with auto-created or templated channels

***

### Form Submission

Trigger when someone submits a Threadly form — great for automating responses, routing requests, or updating external systems.

#### Configuration

| Setting                | Description                               |
| ---------------------- | ----------------------------------------- |
| **Form**               | Select which form triggers the workflow   |
| **Filters** (optional) | Add conditions based on form field values |

#### Filter Options

| Operator         | Description                               |
| ---------------- | ----------------------------------------- |
| **Equals**       | Field value exactly matches               |
| **Contains**     | Field value contains the text             |
| **Greater Than** | Field value is greater than (for numbers) |
| **Less Than**    | Field value is less than (for numbers)    |

Combine multiple filters with **AND** (all must match) or **OR** (any can match).

#### Available Variables

| Variable         | Description                                          |
| ---------------- | ---------------------------------------------------- |
| `{{user}}`       | The person who submitted the form                    |
| `{{field_name}}` | Any form field value (use the field's internal name) |

#### Example Use Cases

* Send a confirmation DM when someone submits a feedback form
* Notify managers when a time-off request is marked "Urgent"
* Route support tickets based on the selected category
* Update HubSpot when a lead capture form is submitted

#### Example Configuration

> Trigger when the "Priority" field **equals** `Urgent`

This filters the workflow to only run for urgent submissions.

***

### Message Posted

Trigger when messages are posted in specified channels — useful for monitoring activity or responding to specific keywords.

#### Configuration

| Setting                 | Description                                                           |
| ----------------------- | --------------------------------------------------------------------- |
| **Channels**            | Select channels to monitor                                            |
| **Keywords** (optional) | Only trigger on messages containing specific words (case-insensitive) |

#### Available Variables

| Variable      | Description                       |
| ------------- | --------------------------------- |
| `{{user}}`    | The person who posted the message |
| `{{channel}}` | The channel where it was posted   |

#### Example Use Cases

* Alert a team when "urgent" is mentioned in #support
* Track when competitors are mentioned in sales channels
* Trigger follow-ups when specific product names appear

#### Behavior Notes

* Bot messages are automatically ignored
* Messages from the workflow creator are ignored
* Has a **60-minute cooldown per channel** to prevent spam
* Cooldown is channel-based, not user-based

{% hint style="info" %}
This trigger may require a feature flag to be enabled for your workspace.
{% endhint %}

***

### Trigger Comparison

| Trigger                    | Best For                        | Key Variables             | Cooldown Behavior       |
| -------------------------- | ------------------------------- | ------------------------- | ----------------------- |
| **On a Schedule**          | Recurring reminders, updates    | `{{channel}}`             | N/A                     |
| **User Joins Channel**     | Onboarding, welcome messages    | `{{user}}`, `{{channel}}` | Per-user (configurable) |
| **Channel Meets Criteria** | Scaling across dynamic channels | `{{channel}}`             | Per-channel (automatic) |
| **Form Submission**        | Automating form responses       | `{{user}}`, form fields   | Per-user (configurable) |
| **Message Posted**         | Monitoring, keyword responses   | `{{user}}`, `{{channel}}` | Per-channel (60 min)    |

***


---

# 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://threadly.gitbook.io/threadly/workflows/workflow-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.
