> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On event

> Run an automation for any supported Slack event.

`slack.onEvent` is the broad Events API escape hatch. It emits app mentions, ordinary messages and replies, message changes and deletions, reactions, conversation membership, files, workspace members, public channels, shared channels, and pins visible to the installed bot.

```ts automations/log-slack-events.automation.ts theme={null}
import { automation } from "automate.ax"
import { slack } from "automate.ax/slack"

export default automation("Log Slack events", () => {
  const event = slack.onEvent()
  // Use event.event.type to route supported Slack event payloads.
})
```

The result includes `workspaceId`, `eventTimestamp`, the typed provider `event`, and the complete Events API `envelope`. Use a semantic Slack trigger when only one event family should activate the automation.
