Originally forked from https://github.com/WeAllJS/wheelie-slack-app. Handles new account sign ups/invitations/approvals. Handles administrative commands.
Groovy Community Slack Team ID: T2LNDB8SG
- Deploy application (Heroku or EC2). Only requirements is that it needs a public URL that is HTTPS. (Required by Slack).
- Also need an available redis install.
- Set up a new Slack Application.
- In the Basic Information section, get the Client ID and Secret.
- In the OAuth & Permissions section, enter the redirect URL as
https://<url>/oauth
- In Bot Users, add a new bot user.
- In Interactive Messages, set Request URL as
https://<url>/button
- In Slach Commands, add the following:
/admins
points tohttps://<url>/admin
/command
points tohttps://<url>/command
- Now go back to the Basic Info section and there should be a Verification Token field.
- Configure environment variables for app:
SLACK_CLIENT_ID
- from Slack AppSLACK_CLIENT_SECRET
- from Slack AppVERIFICATION_TOKEN
- from Slack AppSLACK_ADMIN_CHANNEL
- channel to send notifications of/admins
messages to.SLACK_SIGNUPS_CHANNEL
- channel to send signup notifications to.SLACK_INVITE_TOKEN
- an administrator's Slack API token (apps can't do invites apparently)REDISCLOUD_URL
- connection string for redis
- Install the app into the community by going to
https://<url>/install
- Select the Slack Team
The following form template can be used as a sign up page:
<form action="https://{{app_url}}/signup" method="POST">
<label><span>Name: </span><input name="name" required="" type="text" class="input-field"></label>
<label><span>Email: </span><input name="email" required="" type="email" class="input-field"></label>
<label><span>Twitter (optional): </span><input name="twitter" type="text" class="input-field"></label>
<label><span>GitHub (optional): </span><input name="github" type="text" class="input-field"></label>
<label><span>About You</span></label>
<textarea name="about" placeholder="Tell us a bit about yourself! Anything or nothing is fine!" class="textarea-field"></textarea>
<label><span> </span><input type="checkbox" name="coc" required="" class="input-field"> I agree to the <a href="{{coc_url}}">Code of Conduct</a> and <a href="{{enforcement_url}}">Enforcement Policy</a>
</label>
<input type="hidden" name="redirect_uri" value="{{postsignup_url}}}}">
<input type="hidden" name="team_id" value="{{slack_team_id}}">
<label><span> </span><button type="submit">Sign Up</button></label>
</form>
Any user can send a private message to the administrations by use the /admins
command.
The message will be sent to the admins private channel along wit the user name and the channel it came from.
The app also exposes the /command
function to administrate the community.
These commands are only available to admins.
Other users will be shown an access denied message if they attempt to us it.
List available commands:
/command list
Get command help:
/command help list