# Send Slack Message

{% hint style="info" %}
The Gradient Works Slack app must be [installed in your workspace](/kb/integrations/slack.md) to use this action. This action runs asynchronously and does not have any result outputs.
{% endhint %}

The message body supports @ mentioning other users in a couple of ways:

1. Using a Salesforce User record or Id (The User's email must match in Salesforce and Slack)
2. Slack display name

Need to show additional record information at a glance?

Use the "Fields to Display" section of the action editor to customize what information we include about Salesforce records in the Slack message.

To add a link to a record in the Slack message, add a record in the "Linked Records" section. We'll include a "View in Salesforce" button in the Slack message.

## Configuration

{% tabs %}
{% tab title="Flow Element" %}

<figure><img src="/files/lYMAIHIG41RC7ZZ9P1Yl" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Apex Properties" %}
Please note that you will not directly interact with these input fields as you do with some Flow Actions. Instead the Gradient Works custom editor takes care of the heavy lifting.

| Name                | Required | Type    | Description                                                              |
| ------------------- | -------- | ------- | ------------------------------------------------------------------------ |
| message             | Yes      | String  | The message text.                                                        |
| attachmentFields    | No       | String  | Deprecated                                                               |
| attachmentId        | No       | Id      | Deprecated                                                               |
| attachmentRecord    | No       | SObject | Deprecated                                                               |
| channel             | No       | String  | A Slack channel id or name to send a message to                          |
| fieldsJson          | No       | String  | List of fields to display in Slack message                               |
| linkedRecordsJson   | No       | String  | List of records to link to in Slack message                              |
| notificationType    | No       | String  | The type of message that will be sent. One of: Channel or Direct Message |
| recipientApiId      | No       | String  | A Slack User Id to send a direct message to                              |
| recipientIdentifier | No       | String  | A Salesforce User Id or Email to send a direct message to                |
| recipientRecord     | No       | User    | A Salesforce User record to send a direct message to                     |
| {% endtab %}        |          |         |                                                                          |
| {% endtabs %}       |          |         |                                                                          |


---

# 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.gradient.works/kb/automation-builder-kit-abk/actions/next-steps/sendchatnotificationaction.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.
