This bot shortens long URLs for you in Slack.
To run you need:
- This image
- A google api token so that you can use their URL shortener API. See: https://developers.google.com/url-shortener/v1/getting_started
- A Slackbot API token. See: https://my.slack.com/services/new/bot
To run all you need to do is:
docker run -d -e BOT_NAME="some_name" -e SLACKBOT_TOKEN=XXXXX -e GOOGLE_API_TOKEN=XXXXX --name url_bot kylesoskin/slack_url_bot
This will start the bot up in the background (to do in foreground, omit the
To check the logs for it you can then do:
docker logs url_bot
To change the character limit at which it auto shortens URLs, direct message the bot and say:
Where N is the longest URL you would like to allow (defaults to 100).
To change the message it displays when someone posts a long URL, direct message the bot:
set-auto-response-msg:Some new message
Where "Some new message" is the new message you want it to display (defaults to "Woah thats a long URL, let me shorten that for you.")
Anyone can also just direct message the bot to have it respond with a shortened URL.
Don't forget, you have to add the bot to any channel you would like it to monitor. To do this just issue
/invite @bot_name in the channel.