My team works on separate feature branches, so I wanted my command to take a branch name as a parameter.

The slash command should look something like this:

/deploy-website [branch name]

After invoking that command, I want that branch checked out from the version control and all the latest changes pulled down to the development server.

Enter Hookdoo — your hooks in the cloud

When you invoke the slash command from the Slack’s message box, it will hit a defined hook endpoint with the necessary payload, so let’s go ahead and create our hook!

Go to my.hookdoo.com and log in, or create an account if you don’t have one. If you are a new user, you will receive a free month of the Micro plan so you can try Hookdoo out, with no strings attached and no payment details required.

After logging in, I am greeted with the “Hook invocation history” page. It is basically a dashboard that contains my recent hook invocations. Since I don’t have any hooks defined yet, it is empty, so let’s go ahead and set up a hook that will handle our Slack slash command.