Skip to content

FLGMwt/serverless-csharp-hipchat

Repository files navigation

serverless-csharp-hipchat

Template for HipChat bot Serverless service using C#

Prerequisites

Getting Started

Deploying the service

  1. Install this service: serverless install -u https://github.com/FLGMwt/serverless-csharp-hipchat
  • Note that this creates a directory named serverless-csharp-hipchat. I'd recommend renaming that to whatever makes sense for you
  1. cd serverless-csharp-hipchat
  2. Run the build script for your system: ./build.sh or ./build.ps1
  3. Deploy your app: sls deploy

Adding your HipChat integration

  1. In the HipChat console, find the page for the room you want to add your integration to
  • Note that you must own the room or be a HipChat admin for the installation
  1. Click "Integrations"
  2. Click "Build Your Own Integration" (first box in the grid)
  3. Name it whatever you please
  4. Click "Create"
  5. Check "Add a command"
  6. For the "slash command" enter how you want your integration to be invoked, e.g. "/officemap"
  7. For the integration url, enter the POST endpoint route listed under endpoints during your sls deploy, e.g. "https://asdfzxcvfoobar.execute-api.us-east-1.amazonaws.com/dev/hello"
  • You can also get this output outside of deploys using serverless info
  1. Click "Save"
  2. In your room, test out your slash command.

Troubleshooting

  • If your slash command doesn't respond, you can try looking at the serverless logs: serverless logs -f <your_function_name>

Tips

  • serverless is aliased as sls. sls deploy is easier to write than serverless deploy
  • Note this gets clobbered by PowerShell's sls alias for Select-String. If you want sls to be the serverless alias, add the following to your $PROFILE: rm Alias:\sls

About

Template for HipChat bot Serverless service using C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published