slack-send 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package slack-send --version 1.1.0
NuGet\Install-Package slack-send -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="slack-send" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add slack-send --version 1.1.0
#r "nuget: slack-send, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install slack-send as a Cake Addin
#addin nuget:?package=slack-send&version=1.1.0

// Install slack-send as a Cake Tool
#tool nuget:?package=slack-send&version=1.1.0

slack-send

Simple Utility to send a slack message by API key and channels

Usage

slack-send -m <message>
# or
slack-send -m <message> -c <channel>
# or
slack-send -m <message> -c <channel1>;<channel2> ...
# or
slack-send -d <description> -t <title> -m <message> -c <channel1>;<channel2> ...
# or
slack-send -d <description> -t <title> -m <message> -c <channel1>;<channel2> ... -j <json>

Configuration (slack-send.json)

{
  "ApiToken": "xoxb-<your Slack API Key for a bot>", 
  "ApiUrl": "https://slack.com/api/chat.postMessage",
  "Channels": [ "<your channel #1>", "<your channel #1>", ... ],
  "Attachments": [
    {
      "author_name": "<your sender name, i.e. GitHub Actions>",
      "author_icon": "https://github.com/fluidicon.png"
    }
  ]
}

'Attachments' JSON Format

https://api.slack.com/reference/messaging/attachments

Example:

{
    "channel": "ABCDEBF1",
    "attachments": 
    [
        {
            "mrkdwn_in": ["text"],
            "color": "#36a64f",
            "pretext": "Optional pre-text that appears above the attachment block",
            "author_name": "author_name",
            "author_link": "http://flickr.com/bobby/",
            "author_icon": "https://placeimg.com/16/16/people",
            "title": "title",
            "title_link": "https://api.slack.com/",
            "text": "Optional `text` that appears within the attachment",
            "fields": 
            [
                {
                    "title": "A field's title",
                    "value": "This field's value",
                    "short": false
                },
                {
                    "title": "A short field's title",
                    "value": "A short field's value",
                    "short": true
                },
                {
                    "title": "A second short field's title",
                    "value": "A second short field's value",
                    "short": true
                }
            ],
            "thumb_url": "http://placekitten.com/g/200/200",
            "footer": "footer",
            "footer_icon": "https://platform.slack-edge.com/img/default_application_icon.png",
            "ts": 123456789
        }
    ]
}

Example

slack-send -m "Hello, World!" -c "#general"
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 80 5/19/2024
1.1.3 82 5/19/2024
1.1.2 70 5/19/2024
1.1.1 64 5/8/2024
1.1.0 58 5/8/2024
1.0.1 127 5/23/2023
1.0.0 115 5/22/2023