Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Team members: Amy Chan, Adam Tropp, Candida Haynes
Entry for: 2018 Capital One DevExchange Hackathon
Awarded for: Microsoft's Cortana Sponsor Prize
Cohabicount in Slack



In a metropolitan like San Francisco, people are increasingly live and work in shared spaces. In particular, our team mate Candida lived in an extremely large cohousing where financial communication can be difficult and messy but essential because they share a bank account. Like many household, they used a messenger - Slack in their case. We wanted to build a messenger-based tool that will utilize Capital One API to improve financial-related communication and management of bank accounts in a shared household or work environment.


Cohabicount is an platform-agnostic chatbot that detects phrases related to bank or account question/requests - such as rewards or points earned, suitable credit offers, or sign up request - then offer the relevant datas or assistance so household members can easily discuss their options or take actions.


  • Azure Bot Framework in a Node.js environment.
  • Azure's Cognitive Services, LUIS (Language Understanding Intelligent Service).
  • Capital One's Rest API in JSON format.
  • For the hackathon demo, the web bot was installed as a Slack bot.


We were initially unsure of what each of the Capital One API can do, so we asked the mentors a lot questions and experimenting took a lot of time. Microsoft's Azure platform also had a lot of services, so we weren't sure which one to use at first. When we did built the bot, we had difficulty connecting to Slack, but we were able found out why with the help from the Microsoft's mentors. Though a LUIS service was set up for the bot, we weren't able to train and utilize it in time for the demo.

Hackathon Progress

The team used the first night to brainstorm and set up our target result goals for the hackathon. We asked about the current industry concerns and technological capabilities with mentors from Capital One and Microsoft. Using Microsoft Bot Framework and the Azure platform, we were able to built a chatbot and install it in Slack. JSON files are created from Capital One API and connected to the chatbot.

Current Progress

The LUIS service have been trained and implemented into the bot. Directories are reorganized. The JS files that made the API called had been cleaned up, and both files and directories are re-organized.


Add more Capital One services but creating more API calls.

Getting started

There are 3 services that you will be utilizing: Capital One API, Microsoft's Azure platform, Microsoft's LUIS platform. Optionally, you may also use Botframework Emulator for local testing, but I wouldn't go into that here.

Local Setup & Azure

  1. Sign up or login at Microsoft Azure.
  2. Follow the doc instruction on Create a new bot service
  3. In the Bot Management section, click Build. On the right side, click Download zip file. Download and extract the directory.
  4. Clone this repository
git clone
cd Cohabicount
  1. Move the directories and files of api_calls, statics, .gitignore, app.js, package.json from the cloned repo to the directory downloaded from Azure bot in Step 3. Allow overwrite of any duplicates.
  2. Deleted the cloned repo.
  3. cd into the Azure bot code directory. NPM install needed node_modules

Capital One

  1. Go Capital One's developer site
  2. To use Capital One API, access token is needed. For testing purpose, go to Capital One's API page and click on an API that you are interested in. Go to Playground.
  3. Click the Send button to get an temporary playground access token. Make sure to copy it down.
  4. Sign into Azure portal and select your Web Bot. Go to Application Settings
  5. In the *App Settings panel at the right, add a new key named ACCESS_TOKEN. In the corresponding value, add the access token you got from the playground earlier.


  1. A LUIS bot have to created separately and connect to your web bot. Start by logging in the LUIS portal.
  2. Go to My Apps, select Create new app.
  3. Name your application Cohabicount or Cohabicount LUIS. Language should be English by default. Click Done.
  4. Under App Assets, select Intents. At the right panel, click + Create new intent.
  5. For the Intent name, enter getInfo.
  6. Under App Assets, select Entities. At the right panel, click + Create new entity.
  7. For the Entity name, enter the Capital One API you are interested in. For now, the options are Credit Offers or Rewards. Entity type should remain Simple by default.
  8. Go back to getInfo in Intents.
  9. Read Build custom app to determine user intentions to learn and start training your LUIS app.
  10. When finish training, select the top tab Manage.
  11. In the left sidebar, select Application Information. In the right panel, look for Application ID. Copy that down.
  12. In the left sidebar, select Keys and Endpoints. In the right panel, look for Authoring Key. Copy that down. In the table below, there should be endpoint URL. Copy down the part of url that look like this: That is your region value for key LUIS_APP_HOSTNAME later.
  13. To connect the LUIS app to the web bot, go back to the Azure portal and select your web bot.
  14. Go to Application Settings and add in keys: LUIS_APP_ID, LUIS_APP_KEY, LUIS_APP_HOSTNAME.


Publish the new files to Azure platform

npm install -g azure-publish
npm run azure-publish

Using Azure's channel, the bot can be installed in various communication apps like Slack. Go to Connect a bot to channels for more information.


Entry for Capital DevExChange: Responsible financial accountability for crazy large co-house, co-house, or family household






No releases published


No packages published