> ## 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 reaction added

> Start an automation when someone adds a Slack emoji reaction.

`onReactionAdded` emits reactions added to Slack items visible to the installed
bot.

## Example

```ts automations/handle-slack-approval.automation.ts theme={null}
import { automation } from "automate.ax"
import { onReactionAdded } from "automate.ax/slack"

export default automation("Handle Slack approval", () => {
  const reaction = onReactionAdded()
  reaction.transform(({ reaction, item }) => ({
    approved: reaction === "white_check_mark",
    item,
  }))
})
```

## Options

`account?: string | IntegrationAccountReference<"slack">` statically selects
the workspace and defaults to the project's Slack binding.

## Trigger data

Returns `eventTimestamp`, `workspaceId`, `reaction` (without colons), `userId`,
optional `itemUserId`, and a discriminated `item`:

* `{ type: "message"; conversationId; messageTimestamp; conversationType? }`
* `{ type: "file"; fileId }`
* `{ type: "fileComment"; fileId; fileCommentId }`

Branch on `item.type` before accessing message or file-specific identifiers.
