Files
oam/knowledge base/slack.md
2025-02-03 23:20:08 +01:00

2.7 KiB

Slack

  1. TL;DR
  2. Add custom emoji
  3. Give aliases to existing emojis
  4. Apps
  5. Incoming webhooks
  6. Further readings
    1. Sources

TL;DR

Setup
brew install --cask 'slack'
mas install '803453959'
Usage
# Send notifications to channels
curl -X 'POST' -H 'Content-type: application/json' \
  --data '{"text": "Hello, World!"}' \
  'https://hooks.slack.com/services/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'

Add custom emoji

Check out slackmojis for some common reactions.

  1. Go to https://{{org-name}}.slack.com/customize/emoji.
  2. Select Add Custom Emoji.
  3. Upload the image. Supported formats: GIF, JPG, PNG.
  4. Give it a name.

Give aliases to existing emojis

  1. Go to https://{{org-name}}.slack.com/customize/emoji.
  2. Select Add Alias.
  3. Choose the image.
  4. Give it an alias.

Apps

Direct links:

Incoming webhooks

Refer Sending messages using incoming webhooks and Setting Up Slack Webhook URL Simplified 101.

  1. Enable Incoming Webhooks for a Slack app.
    FeaturesIncoming WebhooksActivate Incoming Webhooks.

  2. Create a new Webhook URL and authorize it (or request authorization for it).

  3. Install the app in the workspace.

  4. Send a test request to the webhook.

    curl -X 'POST' -H 'Content-type: application/json' \
      'https://hooks.slack.com/services/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' --data '{"text": "Hello, World!"}'
    

Further readings

Sources