---
title: Get Slack message reactions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/slack/slack-chat-get-reactions
---

Retrieves emoji reactions on a Slack message, waiting up to a configurable timeout.

For prerequisites, see [Slack chat actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/slack/slack-chat#prerequisites).

## Get message reactions

The action identifier is `slack.chat.getReactions`.

Gets a reaction of a message from a Slack channel.

### Inputs

The following table describes all available input fields for this action.

| Input         | Type   | Description                                                                                                                                                                                                                                                                                 | Example                                                        |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| **token**     | Secret | **Required.** The Slack bot token to use. This should be passed as a secret syntax. Refer to [Add Slack configuration](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/slack/slack-chat#slack-configuration) for instructions on setting up a token. | `${{ :secrets:slackToken }}`                                   |
| **channelID** | String | **Required.** The channelID to get the message reactions from. See [`reactions.get` method](https://docs.slack.dev/reference/methods/reactions.get/#arg_channel).                                                                                                                           | `C063JK1RHN1`                                                  |
| **threadTs**  | String | **Required.** Timestamp belonging to the message, used to get the reaction of that message.                                                                                                                                                                                                 | `<digits>.<digits>`                                            |
| **timeout**   | Int    | **Optional.** The time in seconds to wait for any reaction. Default is 60s, maximum allowed is 600s (10 min).                                                                                                                                                                               | `60`                                                           |
| **selectors** | List   | **Optional.** The selectors to get only the specified parameters as output.                                                                                                                                                                                                                 | `[{\"name\": \"reactions\", \"expression\": \".reactions \"}]` |

### Outputs

The following table describes all output fields returned by this action.

| Output           | Type    | Description                                                                                 |
| ---------------- | ------- | ------------------------------------------------------------------------------------------- |
| **reactions**    | List    | List of elements with all the reactions captured, or an empty list if the timeout occurred. |
| **success**      | Boolean | `true` on success, `false` on failure.                                                      |
| **errorMessage** | String  | Failure reason as message. Example: `Invalid slack token`.                                  |

### Example

**Example: Get Slack message reactions**

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: GetReactions  steps:   - name: getReactions     type: action     action: slack.chat.getReactions     version: 1     inputs:       token: ${{ :secrets:dn_staging_slack_token }}       channelID: ${{ .steps.promptUser.outputs.channelID }}       threadTs: ${{ .steps.promptUser.outputs.threadTs }}       timeout: ${{ .workflowInputs.timeout }}       selectors: ${{ .workflowInputs.selectors }} ``` **Inputs:** ```json {   "inputs": [     {       "key" : "channelID",       "value" : "C063JK1RHN1"     },     {       "key" : "threadTs",       "value" : "1718897637.400609"     },     {       "key" : "selectors",       "value" : "[{\"name\": \"reactions\", \"expression\": \".reactions \"}]"     }   ] } ``` **Outputs:** ```json [   {     "name": "grinning",     "users": ["W222222"],     "count": 1   },   {     "name": "question",     "users": ["W333333"],     "count": 1   } ] ``` If the timeout expires before any reactions are added, the output is an empty list: `[]` |
