mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +00:00
Document slack thread/reply support (#27490)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
d85a1c57c0
commit
ce49cc7eca
@ -9,6 +9,7 @@ ha_domain: slack
|
||||
ha_iot_class: Cloud Push
|
||||
ha_codeowners:
|
||||
- '@tkdrob'
|
||||
- '@fletcherau'
|
||||
ha_platforms:
|
||||
- notify
|
||||
- sensor
|
||||
@ -142,6 +143,7 @@ The following attributes can be placed inside the `data` key of the service call
|
||||
| `file` | yes | A file to include with the message; see below.
|
||||
| `blocks` | yes | Array of [Slack blocks](https://api.slack.com/messaging/composing/layouts). *NOTE*: if using `blocks`, they are shown **in place of** the `message` (note that the `message` is required nonetheless).
|
||||
| `blocks_template` | yes | The same as `blocks`, but able to support [templates](https://www.home-assistant.io/docs/configuration/templating).
|
||||
| `thread_ts` | yes | Sends the message as a reply to a specified parent message.
|
||||
|
||||
Note that using `file` will ignore all usage of `blocks` and `blocks_template` (as Slack does not support those frameworks in messages that accompany uploaded files).
|
||||
|
||||
@ -243,3 +245,12 @@ title: "Reminder"
|
||||
data:
|
||||
blocks: []
|
||||
```
|
||||
|
||||
Send a message as reply to an existing message. `thread_ts` can be retrieved via a script utilising [Bolt](https://slack.dev/bolt-python/tutorial/getting-started), any other Slack library, or the Slack API directly.
|
||||
|
||||
```yaml
|
||||
message: "Here's some supplementary information that doesn't need to be present in the channel directly."
|
||||
target: "#general"
|
||||
data:
|
||||
thread_ts: "1684736481.064129"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user