mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-29 21:57:16 +02:00
1.3 KiB
1.3 KiB
sidebar_position |
---|
2 |
Send ephemeral message
Sends a message that arrives in the channel but is visible only to a specific user
Function SendEphemeralMessage(Val Token, Val Channel, Val Text = "", Val User = "", Val Blocks = "") Export
Parameter | CLI option | Type | Description |
---|---|---|---|
Token | --token | String | Bot token |
Channel | --channel | String | Channel ID |
Text | --text | String | Message text |
User | --user | String | User ID |
Blocks | --blocks | Array of Structure | JSON array of block descriptions |
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
Token = "xoxb-6965308400114-696804637...";
Channel = "C06UFNUTKUL";
User = "U06UABH3APP";
Image = "https://openyellow.neocities.org/test_data/picture.jpg";
Text = "Ephemeral message";
Block = OPI_Slack.GenerateImageBlock(Image, "Image");
Result = OPI_Slack.SendEphemeralMessage(Token, Channel, Text, User, Block);
oint slack SendEphemeralMessage --token %token% --channel "C070VPMKN8J" --text %text% --user %user% --blocks %blocks%
{
"ok": true,
"message_ts": "1714146540.000300"
}