This bot is based on: https://github.com/indigotech/tqt-bot/blob/master/README.md
Bot that will read URLs posted on Slack and add them to a Swiftype engine
This bot runs using node-foreman, so to set up you local environment variables, create .env file with the following values
SLACK_TOKEN
: Token to be used to connect to Slack. Check https://my.slack.com/services/new/bot to create/get one.MONGOLAB_URI
: The MongoDB url. It will be used to store the filtersSWIFTYPE_TOKEN
: Swiftype API token that will be used to store/delete documents on Swiftype. (Check your )
tip: You can use .env.example
file as a template for the config
-
Tested only on node.js
v0.12.0
-
Execute:
$ npm install
$ npm start
- The bot will assume that your engine document structure will be like:
{
name: 'title'
value: title
type: 'string'
}
{
name: 'description'
value: description
type: 'string'
}
{
name: 'keywords'
value: tags
type: 'string'
}
{
name: 'url'
value: url
type: 'string'
}
- Search engine and document name are currently hard coded, they should be environment variables
- Change engine name and document type to match your account
- Refactor all the code
- Add URL information to Mongo database, like who posted it and date
- Having all the info on Mongo, the bot can check if the URL was already posted
- Improve the help messages and bot commands
- Add proper tests
- Check Amazon CloudSearch to replace Swiftype
- Create isolated modules so we can use on other bots projects