Skip to content

Documentation for Slack is virtually non-existent and confusing #165

@millermarkj

Description

@millermarkj

I started a thread on the Discussions board but this seems to be more suited for Issues.

I was only able to fully determine the expected format of a Slack connection string after noting Issue 90 (#90), which has been closed but not resolved (the documentation is still woefully lacking).

It appears that a Slack connection string needs to be in the format of a slack webhook, not an API key or token. So theoretically, the format would be:

slack://A1B234CDE/Z12345Y123Q/ABCD1lmnoPqr0tuVwXYz

Edit: This is related to the application I'm using which integrates shoutrrr, not shoutrrr itself, so I've struck it.
Unfortunately this doesn't seem to work:

# curl -X POST http://localhost:8080/api/health/notify
{"errors":["thumb_url is not a valid config key [color title]"],"success":false}


This is still essentially undocumented and should be fixed. At a bare minimum, the documentation should include a link to the "Getting Started" page for Slack webhooks: https://api.slack.com/messaging/webhooks

On top of this, the generator for Slack is broken and throws an error on any input to the "token" field:

user@hostname:/opt/svc/scrutiny$ docker run --rm --interactive containrrr/shoutrrr generate slack
Generating URL for slack using basic generator
Enter the configuration values as prompted

BotName: botname
Color: blue
Title: botname
Token:
Field Token is required!

Token: 0

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/containrrr/shoutrrr/pkg/services/slack.(*Config).getURL(0xc0000b2aa0, 0xadd240, 0xc000097080, 0xc0000b2aa0)
        /home/runner/work/shoutrrr/shoutrrr/pkg/services/slack/slack_config.go:37 +0x35d
github.com/containrrr/shoutrrr/pkg/services/slack.(*Config).GetURL(0xc0000b2aa0, 0xc00000e018)
        /home/runner/work/shoutrrr/shoutrrr/pkg/services/slack/slack_config.go:24 +0xb9
github.com/containrrr/shoutrrr/cli/cmd/generate.Run(0xe6bf80, 0xc00006d4b0, 0x1, 0x1)
        /home/runner/work/shoutrrr/shoutrrr/cli/cmd/generate/generate.go:127 +0x82f
github.com/spf13/cobra.(*Command).execute(0xe6bf80, 0xc00006d490, 0x1, 0x1, 0xe6bf80, 0xc00006d490)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xe6c760, 0x0, 0x0, 0xc000098058)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:943 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:883
main.main()
        /home/runner/work/shoutrrr/shoutrrr/cli/main.go:26 +0x2d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions