# Slack Message

UI Bakery allows you to send Slack messages from your action to a predefined channel webhook.

By default, you can send plain text messages like this:

```javascript
{
  text: 'Hello World!'
}
```

<figure><img src="/files/kzmWMpHPpQKKts8D9Fjx" alt=""><figcaption></figcaption></figure>

Slack API returns the `"ok"` string if the message was sent successfully.

In addition to sending text messages, you can also reference the data from the previous step or the data of the UI component:

```javascript
{
  text: 'Hello ' + {{data.name}} + '!'
}
```

```javascript
{
  text: 'Hello ' + {{ui.input.value}} + '!',
}
```

***

You can also use Slack's [extended message formatting options](https://api.slack.com/messaging/webhooks#advanced_message_formatting), such as block & attachments.


---

# 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://docs.uibakery.io/reference/working-with-actions/slack-message-action.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.
