Skip to content

Save every URL shared on Slack on a db hosted by you

Notifications You must be signed in to change notification settings

keyserfaty/slack-to-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

slack to db

Save every URL shared on Slack on a db hosted by you.

Getting started

slack to db saves every URL that is shared on a specific Slack channel in your team to a Mongo db that you host. To do this it runs a cron task using webtask every five minutes and searches for links on the messages shared on the channel.

To get started you will need to install webtask and setup your username:

npm install wt-cli -g
wt init username

To start the cron task run:

wt cron schedule \
    -n slack-to-db \
    -s MONGO_URL=mongodb://username:[email protected]:21943 \
    -s SLACK_TOKEN=xxx-xxxx-xxxx-xxxx \
    -s SLACK_CHANNEL=ABC123 \
     "*/5 * * * *" \
     app.js
     --watch

You will need to specify a mongo URL, a Slack token and a Slack channel to run the cron task. You can get a Slack token for testing here. Remember you will need to add the ID of the channel you would like to keep track of, not the channel's name. You can find out the ID of every channel in your team here.

webtask will provide you with an URL. Access the URL to test the task and start it :)

License

Released under The MIT License.

About

Save every URL shared on Slack on a db hosted by you

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published