# Slack

Add a Slack model with:

```
$ yarn add @xomlo/xomlo-models-slack
```

Init the Slack object like this:

```typescript
import { Slack } from "@xomlo/xomlo-models-slack";

...
const Slack = new Slack(...);
```

### **Config object**

```typescript
const Slack = new Slack({
    token: "{my-slack-api-token}"
});
```

**Reference:**

| Parameter | Type   | Description                                                                                                                                                |
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token     | string | Your Slack API token which you can generate in Slack settings. More info on [Slack documentation](https://api.slack.com/tutorials/tracks/getting-a-token). |

### .sendMessage()

This method will send your message to a given channel.

**Arguments:**

| Argument | Type   | Description                                          |
| -------- | ------ | ---------------------------------------------------- |
| channel  | string | Name of the channel you want to send your message in |
| message  | string | Your own message                                     |

**Returns:**

void


---

# 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://xomlo.gitbook.io/xomlo-io/model-reference/slack.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.
