mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
Clarify Slack member ID retrieval (#30091)
* Document member ID retrieval in house * Normalise usage of member vs user * Change instructions to ordered list * Update source/_integrations/slack.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> * Update slack.markdown --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
a3e77ed933
commit
201600fddc
@ -162,6 +162,16 @@ To include a remote file with the Slack message, use these attributes underneath
|
||||
| `username` | yes | An optional username if the URL is protected by HTTP Basic Auth.
|
||||
| `password` | yes | An optional password if the URL is protected by HTTP Basic Auth.
|
||||
|
||||
### Obtaining a member ID
|
||||
|
||||
Some of the examples below use a member ID. This is a unique string assigned by Slack to all users (members and guests) and not a username set by the user. To get a member ID:
|
||||
|
||||
1. Select a Slack user (both name and profile image work) to bring up their profile side panel.
|
||||
2. Open the context menu by selecting the three dots.
|
||||
3. Select **Copy member ID**.
|
||||
|
||||

|
||||
|
||||
### Examples
|
||||
|
||||
To send a file from local path:
|
||||
@ -227,7 +237,7 @@ data:
|
||||
1.0
|
||||
```
|
||||
|
||||
Send a message directly to a user by setting the target to their member ID. Here are [instructions](https://www.workast.com/help/articles/61000165203/) to obtain a member ID.
|
||||
Send a message directly to a user by setting the target to their member ID.
|
||||
|
||||
```yaml
|
||||
message: "Hello there!"
|
||||
@ -237,10 +247,10 @@ data:
|
||||
blocks: []
|
||||
```
|
||||
|
||||
Send a message to a channel that mentions (@username, highlights a users name in yellow) a user. Here are [instructions](https://www.workast.com/help/articles/61000165203/) to obtain a member ID.
|
||||
Send a message to a channel that mentions (@username, highlights a users name in yellow) a user.
|
||||
|
||||
```yaml
|
||||
message: "<@U12345> your appointment starts soon"
|
||||
message: "<@MEMBER_ID> your appointment starts soon"
|
||||
target: "#general"
|
||||
title: "Reminder"
|
||||
data:
|
||||
|
BIN
source/images/integrations/slack/slack-member-id.png
Normal file
BIN
source/images/integrations/slack/slack-member-id.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Loading…
x
Reference in New Issue
Block a user