A (UNOFFICIAL) wrapper of the SlackAPI in Julia
Author JuliaLangSlack
5 Stars
Updated Last
1 Year Ago
Started In
December 2019


codecov Build Status

Check out the Docs

Current State

The only feature that still needs to be actively developed for the single production project utalizing this code is the addition of some functions for threaded messages. Once this is done, unless there is a community requested addition, this code will remain pretty much static.

Feel free to open an issue or Pull Request with additions or feature requests/bugs.


The first thing you will need to use this package is a Slack Workspace to install a Slack app into.

After that, you will need to add a webhook to your app such that you can send and retrieve data from the Slack Workspace.


julia> ]
(v1.3) pkg> add Slack


Here is a simple example:

Note that the endpoint in the example and tests was deprecated automatically by Slack's API Security Crawler.

julia> using Slack

julia> endpoint = "/services/TQVJBU534/BR8C1LMPS/42thawJz34SWSgZCpniyLBSE"

julia> data = "Hello World"
"Hello World"

julia> response = sendtoslack(data, endpoint)

The result of running this code produces the following in the test Slack Workspace:


To learn more about how data should be formatted before sending it as a argument to the above code, check out the Slack API Docs.

You can also check your messages format using Slacks Message Formatting Tool.

And here is a more complicated example using attachments:

julia> using Slack

julia> endpoint = "/services/TQVJBU534/BR8C1LMPS/42thawJz34SWSgZCpniyLBSE"

julia> attachment = Dict("attachments" => [Dict("fallback" => "Required plain-text summary of the attachment",
                                               "color" => "#36a64f",
                                               "pretext" => "Optional text that appears above the attachment block",
                                               "author_name" => "Bobby Tables",
                                               "author_link" => "",
                                               "author_icon" => "",
                                               "title" => "Slack API Documentation",
                                               "title_link" => "",
                                               "text" => "Optional text that appears within the attachment",
                                               "fields" => [Dict("title" => "Priority",
                                                   "value" => "High",
                                                   "short" => false
Dict{String,Array{Dict{String,Any},1}} with 1 entry:
  "attachments" => Dict{String,Any}[Dict("author_link"=>""

julia> response = sendattachmenttoslack(attachment, endpoint)

The result of running this code produces the following in the test Slack Workspace:



Note that this functionality is currrently disbaled

I have gone through the trouble of setting up a Slack Workspace in order to test this package. After this is all stabilized, I will remove the endpoint from the Slack Workspace and deprecate the examples you see throughout this repo.

In the meantime, I cannot stop you from using the end point URL I have setup. Please use it responsibly.

Used By Packages

No packages found.