ccb-slack makes it easy to access information from CCB directly from your Slack channels.
- Look up people's contact information
- Find recently added people
- Check attendance for an event
- Locate people on a map
git clone https://github.com/dbussert/ccb-slack.git
npm installSet environment variables
PORTthe web server port (default 8000)ccb_usernamethe API userccb_passwordthe API passwordccb_urlyour CCB siteslack_tokenyour Slack integration token to ensure only your channels are making requests (only when NODE_ENV=production)NODE_ENVthe node environment to enforceslack_tokenverification (default NOT production)
Create a slash command integration in Slack
- command
/ccb - url
public url of your ccb-slack server - method
GET
Get all matching people from CCB
'Name' can be any partial part of:
FirstNameLastNameFirstNameLastName(only if the 'LastName' does not match any 'FirstName')
Get all people added to CCB since Date
Date can be the following:
last weekyesterdaytwo weeks agoX weeks ago
Get attendance for an event since Date. Currently only a single event ccb_event_id set in the environment variables.
Date can be the following:
2015-08-28since 2015-02-08last X weeks
Geolocate all individuals in CCB and return a KML of locations. Note: this call cannot be done through Slack, as it does not return a message format Slack understands. Instead it should be called directly in a web browser.
http://localhost:8000/?command=ccb&text=map%20everyone
Note: geolocating is purposely slow to not exceed Google's geocoding API limit (5 calls/sec). Expect this call to take a long time even for a few hundred users.
Responses from ccb-slack can be specially formatted if the defaults do not suffice, e.g. get people since last week as a CSV to paste into an email. To format, append a JSON block to the end of the command:
/ccb whois Smith {"delimiter":",", "break":",", "columns":["email"]}
delimiterthe separator between each column of information for a person (default:-breakthe separator between each person (default:\n)columnsan array of columns of information for a person (default: varies per call)
- name
- first_name
- last_name
- phone
- created
- creator
- modified
- modifier
- address
MIT. Copyright (c) Dillon Bussert.