In the world of software development, it is hard to keep track of everything and everyone. This is especially with many teams having remote developers. Two popular tools to help keep teams synced, are Slack and Basecamp. Slack allows teams to quickly chat and share files. Basecamp helps with longer chats, as well as providing a calendar feature. Because Slack is the goto software, most team members will always have Slack open. While Basecamp provides the ability to email the team, not everyone checks messages these messages. Additionally, checking the Basecamp calendar every day to see who is out can be annoying. The solution: Integrate Slack with Basecamp. This is rather simple to do, and results in a message being posted to Slack. The message contains absences for today and tomorrow.

Steps:

  1. Create a Slack Webhook
    1. Goto https://yourslackteamname.slack.com/apps/A0F7XDUAZ-incoming-webhooks and install the app.
    2. Once installed go back to the same url if not already there, and select “Add Configuration”.
    3. Under “Choose a channel”, select any channel, and then select “Add incoming webhooks integration”.
    4. Note the url under “webhook url”, you will need this later.
  2. Gather Your Basecamp 2 ID, and Project ID
    1. Go to main page of your Basecamp project: usually https://basecamp.com/12345/projects/6789
    2. The first set of numbers is your Basecamp 2 ID and the second set is your Project ID. These values will be needed later.
  3. Generate an Auth token for Basecamp
    1. Using Postman “GET” the following URL: https://basecamp.com/Basecamp 2 ID/api/v1/projects.json
    2. Under Authorization select “Type: Basic Auth” and enter your username and password
    3. Run the Query, then under Request Headers copy the value under “Authorization: Basic ValueToCopy”
  4. Create a AWS Lambda function, and paste the code found in https://github.com/bytelion/basecamp_to_slack/blob/master/lambda_function.py
  5. In the code replace the following:
    1. YourEmailHere with Your Email
    2. YourAuthHere with the value copied from step 3
    3. YourBaseCampIDHere with Basecamp 2 Id from step 2
    4. YourBaseCampProjectIdHere with Project ID from step 2
    5. YourSlackHookURLHere with the webhook url found in step 1
    6. @YourNameHere with @ your slack name
    7. #YourChannelHere with #the channel you want the notification posted in
  6. Configure a Cloudwatch scheduled event to trigger your lambda function at the time you want to receive the slack message

Basecamp message format:

  • Post needs the following in the title: the word “out” in any case, and either mm/dd or m/d.
  • Examples:
    • JOE OUT | 07/07
    • Steve out | 07/07
    • Smith out | 7/7
    • John will be out on 7/7
  • If the post is on the calendar then no specification is need in the title.
  • For absences spanning multiple days.
    • Post the message on the calendar.
    • Put each specific day in the message title.