# Slack events (https://www.shipfox.io/docs/integrations/slack/events)

Description: See which Slack events can start a workflow and what each event contains.

> Slack sends events for actions made by the installed bot. If your workflow
> posts a message, that event can start the workflow again.

## Event catalog [#event-catalog]

Use your Slack integration connection slug instead of `slack_acme`.

### Events API

Activity from conversations that the installed app watches. Your workflow also receives the workspace ID, app ID, event ID, and event time.

**Payload:** Fields listed below. [Slack docs](https://docs.slack.dev/reference/events/)

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string: `app_mention`, `message`, `reaction_added` | Required | Slack event type. |
| `team_id` | string | Required | Slack workspace ID. Added by Shipfox. |
| `api_app_id` | string | Required | Slack app ID. Added by Shipfox. |
| `event_id` | string | Required | Unique Slack event ID. Added by Shipfox. |
| `event_time` | integer | Required | Event time in epoch seconds. Added by Shipfox. |
| `channel` | string | Optional | Channel where the event happened. |
| `channel_type` | string | Optional | Channel type, such as channel. |
| `user` | string | Optional | User who triggered the event. |
| `ts` | string | Optional | Message timestamp, which identifies the message. |
| `thread_ts` | string | Optional | Parent message timestamp in a thread. |
| `text` | string | Optional | Message text. |
| `bot_id` | string | Optional | Bot that authored the message, when any. |
| `reaction` | string | Optional | Emoji name of the reaction. |

Slack may send other fields. Your workflow receives them too.

#### `app_mention`

A Slack message mentions the installed app.

[Slack docs](https://docs.slack.dev/reference/events/app_mention/)

```yaml
triggers:
  on_app_mention:
    source: slack_acme
    event: app_mention
```

#### `message`

A message event arrives from a subscribed Slack conversation.

[Slack docs](https://docs.slack.dev/reference/events/message/)

```yaml
triggers:
  on_message:
    source: slack_acme
    event: message
```

#### `reaction_added`

A member adds an emoji reaction to a Slack item.

[Slack docs](https://docs.slack.dev/reference/events/reaction_added/)

```yaml
triggers:
  on_reaction_added:
    source: slack_acme
    event: reaction_added
```

### Slash commands

Slash commands sent to the installed app. The event does not include the Slack verification token.

**Payload:** Fields listed below. [Slack docs](https://docs.slack.dev/interactivity/implementing-slash-commands/)

| Field | Type | Required | Description |
|---|---|---|---|
| `command` | string | Required | The invoked command, including the leading slash. |
| `team_id` | string | Required | Slack workspace ID. |
| `channel_id` | string | Required | Channel where the command was invoked. |
| `user_id` | string | Required | User who invoked the command. |
| `response_url` | string (uri) | Required | URL for posting a delayed response. |
| `trigger_id` | string | Required | Short-lived ID for opening a modal. |
| `text` | string | Required | Text entered after the command. Default "". |
| `team_domain` | string | Optional | Slack workspace domain. |
| `channel_name` | string | Optional | Channel name. |
| `user_name` | string | Optional | User name. |
| `api_app_id` | string | Optional | Slack app ID. |
| `is_enterprise_install` | string | Optional | Whether the app is installed at the enterprise level. |
| `enterprise_id` | string | Optional | Enterprise Grid organization ID. |
| `enterprise_name` | string | Optional | Enterprise Grid organization name. |

#### `slash_command`

A user invokes a slash command for the installed app.

[Slack docs](https://docs.slack.dev/interactivity/implementing-slash-commands/)

```yaml
triggers:
  on_slash_command:
    source: slack_acme
    event: slash_command
```