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

# Slack activities

> Available Slack activities and their usage in Thena workflows

Slack activities represent actions that can be performed programmatically in your Slack workspace through Thena workflows. These activities enable automated interactions with channels, messages, and users.

## Quick reference

### All available activities

<AccordionGroup>
  <Accordion title="Message activities" icon="message">
    * [`postMessage`](#postmessage) - Send a new message
    * [`editMessage`](#editmessage) - Edit an existing message
    * [`deleteMessage`](#deletemessage) - Delete a message
  </Accordion>

  <Accordion title="Reaction activities" icon="face-smile">
    * [`addReaction`](#addreaction) - Add emoji reaction to message
    * [`removeReaction`](#removereaction) - Remove emoji reaction from message
  </Accordion>

  <Accordion title="Member activities" icon="user">
    * [`addMember`](#addmember) - Add user to channel
    * [`removeMember`](#removemember) - Remove user from channel
  </Accordion>

  <Accordion title="Channel activities" icon="hashtag">
    * [`joinChannel`](#joinchannel) - Join a public channel
    * [`leaveChannel`](#leavechannel) - Leave a channel
  </Accordion>
</AccordionGroup>

## Understanding activities

<CardGroup cols={2}>
  <Card title="Activity types" icon="list-check">
    • Message operations <br />
    • Reaction management <br />
    • Member management <br />
    • Channel operations <br />
  </Card>

  <Card title="Usage patterns" icon="code">
    • Workflow actions <br />
    • Automated responses <br />
    • Team management <br />
    • Content moderation <br />
  </Card>
</CardGroup>

## Message activities

### postMessage

Send a new message to a Slack channel or user.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "text"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID or user ID to send message to"
      },
      "text": {
        "type": "string",
        "description": "Message text content"
      },
      "thread_ts": {
        "type": "string",
        "description": "Optional timestamp of parent message for threading"
      },
      "blocks": {
        "type": "array",
        "description": "Optional Slack block kit elements"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "channel": {
        "type": "string"
      },
      "ts": {
        "type": "string"
      },
      "message": {
        "type": "object"
      }
    }
  }
  ```
</CodeGroup>

### editMessage

Edit an existing message in Slack.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "ts", "text"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID containing the message"
      },
      "ts": {
        "type": "string",
        "description": "Timestamp of message to edit"
      },
      "text": {
        "type": "string",
        "description": "New message text"
      },
      "blocks": {
        "type": "array",
        "description": "Optional updated block kit elements"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "channel": {
        "type": "string"
      },
      "ts": {
        "type": "string"
      },
      "text": {
        "type": "string"
      }
    }
  }
  ```
</CodeGroup>

### deleteMessage

Delete a message from a channel.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "ts"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID containing the message"
      },
      "ts": {
        "type": "string",
        "description": "Timestamp of message to delete"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "channel": {
        "type": "string"
      },
      "ts": {
        "type": "string"
      }
    }
  }
  ```
</CodeGroup>

## Reaction activities

### addReaction

Add a reaction emoji to a message.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "ts", "name"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID containing the message"
      },
      "ts": {
        "type": "string",
        "description": "Timestamp of target message"
      },
      "name": {
        "type": "string",
        "description": "Emoji name without colons"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      }
    }
  }
  ```
</CodeGroup>

### removeReaction

Remove a reaction emoji from a message.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "ts", "name"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID containing the message"
      },
      "ts": {
        "type": "string",
        "description": "Timestamp of target message"
      },
      "name": {
        "type": "string",
        "description": "Emoji name without colons"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      }
    }
  }
  ```
</CodeGroup>

## Member activities

### addMember

Add a user to a channel.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "user"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID"
      },
      "user": {
        "type": "string",
        "description": "User ID to add"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      }
    }
  }
  ```
</CodeGroup>

### removeMember

Remove a user from a channel.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel", "user"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID"
      },
      "user": {
        "type": "string",
        "description": "User ID to remove"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      }
    }
  }
  ```
</CodeGroup>

## Channel activities

### joinChannel

Join a public channel.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID to join"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "channel": {
        "type": "object"
      }
    }
  }
  ```
</CodeGroup>

### leaveChannel

Leave a channel.

<CodeGroup>
  ```json Request schema theme={null}
  {
    "type": "object",
    "required": ["channel"],
    "properties": {
      "channel": {
        "type": "string",
        "description": "Channel ID to leave"
      }
    }
  }
  ```

  ```json Response schema theme={null}
  {
    "type": "object",
    "properties": {
      "ok": {
        "type": "boolean"
      }
    }
  }
  ```
</CodeGroup>

## Using activities in workflows

<Steps>
  <Step title="Select activity">
    Choose the appropriate Slack activity for your workflow
  </Step>

  <Step title="Configure parameters">
    Set required and optional parameters
  </Step>

  <Step title="Handle responses">
    Process the activity response in your workflow
  </Step>

  <Step title="View executions">
    Monitor and track your Slack activities through the workflow executions page.
  </Step>
</Steps>

## Best practices

<CardGroup cols={2}>
  <Card title="Execution monitoring" icon="chart-line">
    • Check activity status regularly <br />
    • Monitor execution times <br />
    • Track success rates <br />
    • Set up alerts for failures <br />
  </Card>

  <Card title="Activity tracking" icon="list-check">
    • Review execution logs <br />
    • Track rate limits <br />
    • Monitor API usage <br />
    • Analyze performance patterns <br />
  </Card>
</CardGroup>

## Related resources

<CardGroup cols={2}>
  <Card title="Slack events" icon="bolt" href="/platform/sources/slack/events">
    Learn about available Slack events
  </Card>

  <Card title="Workflow creation" icon="diagram-project" href="/platform/core-concepts/workflows/overview">
    Create workflows using Slack activities
  </Card>

  <Card title="Activity monitoring" icon="chart-line" href="/platform/core-concepts/workflows/monitoring">
    Monitor workflow activities
  </Card>

  <Card title="Slack API" icon="book" href="https://api.slack.com/methods">
    Slack API reference
  </Card>
</CardGroup>
