Created
January 17, 2025 03:22
-
-
Save jsuar/b1c021deeaf2d9f222bc9546dfdd36b9 to your computer and use it in GitHub Desktop.
Slack file upload test script for Home Assistant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sequence: | |
- data: | |
message: | | |
Test 1: Single channel plain text test message | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
blocks: [] | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 2: A plain text test message | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
blocks: [] | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 3: local text upload | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
file: | |
path: /Users/theuser/code/core/config/www/test.txt | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 4: local image upload | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
file: | |
path: /Users/theuser/code/core/config/www/mango-truck.png | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 5: remote image upload | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
file: | |
url: >- | |
https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Mangos_-_single_and_halved.jpg/1280px-Mangos_-_single_and_halved.jpg | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 6: remote text file upload | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
file: | |
url: >- | |
https://www.google.com/xjs/_/ss/k=xjs.hd.1husiNOMRd4.L.F4.O/am=CEgVAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEGAnAAAYAMkeYA4AAAIAAwCAAEAABgAABATAABQCAGAAAQACAMIBgCAAAAAAILACAAABOQCgBCAB5AcAUEAAAAQAIAAIMNAQiAogFAAIAAAAAAAAEAAAABgCAAEAwAcAABgAYgAAGD0QAAAAAEAQAAA5A8A-MAABAAAAAAAAEgAAAAAAjAAAAAAAAAAAAAAAAAAAAAEAAEAAAAAAAAAAAAAAAAAAAAAAQA/d=1/ed=1/br=1/rs=ACT90oFM7Deok56pyHeSwr3wTTgFgVC6_w/m=cdos,hsm,jsa,mb4ZUb,cEt90b,SNUn3,qddgKe,sTsDMc,dtl0hd,eHDfl,YV5bee,d,csi | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test 7: remote image upload that requires upscaling for preview | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
file: | |
url: >- | |
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Andromeda_Galaxy_M31_-_Heic1502a_Full_resolution.jpg/260px-Andromeda_Galaxy_M31_-_Heic1502a_Full_resolution.jpg | |
action: notify.slackworkspace | |
- data: | |
message: | | |
Test: remote image within blocks | |
target: | |
- "#test" | |
- "#test1" | |
data: | |
blocks: | |
- type: section | |
block_id: section567 | |
text: | |
type: mrkdwn | |
text: |- | |
<https://example.com|Test 8> | |
:star: | |
Doors had too many axe holes, guest in room 237 was far too rowdy, whole place felt stuck in the 1920s. | |
accessory: | |
type: image | |
image_url: >- | |
https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Mangos_-_single_and_halved.jpg/1280px-Mangos_-_single_and_halved.jpg | |
alt_text: Sedona | |
- type: image | |
slack_file: | |
url: >- | |
https://yourslackworkspace.slack.com/files/link/to/file.gif} | |
alt_text: inspiration | |
- type: image | |
title: | |
type: plain_text | |
text: I love tacos | |
emoji: true | |
image_url: >- | |
https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Mangos_-_single_and_halved.jpg/1280px-Mangos_-_single_and_halved.jpg | |
alt_text: delicious tacos | |
action: notify.slackworkspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment