Connect TheFamily's Youtube channel to Slack teams via the Add To Slack button or simple link in an email ;)
- Clone the repo
- Create a Slack App: the redirection URI must be set where your app is deployed (ie. http://startupfood.meteor.com)
- Get a Youtube Api Key
- If you want to track clicks, get your Mixpanel token.
- Edit
settings.json
with your own credentials :
{
"public": {
"clientId": "YOUR_SLACK_APP_CLIENT_ID",
"botName": "YOUR_BOT_NAME",
"botIcon": "YOUR_BOT_ICON",
"analyticsSettings": {
"Mixpanel": {
"token": "YOUR_MIXPANEL_TOKEN",
"people": false
}
}
},
"private": {
"clientSecret": "YOUR_SLACK_APP_CLIENT_SECRET",
"googleApiKey": "YOUR_GOOGLE_API_KEY"
}
}
That's all, deploy your app & you are ready to push contents to any teams connected to your app.
You can customize the attachments in /server/lib/slack_module.js
.
You may read the Slack attachments doc to better understand how to deal with it.
- Check whether the app is connected to a channel or an user. If it's an user, use Slack's API method to post in user (for ex: slackbot)
- Add search slash command/slackbot to search directly in your Youtube channel or in TheFamily TV directory (tv.thefamily.co).
- Push other content than videos if the user really use this app.
Do not hesitate to open issues, PR or even to hire me ;)