Minute 6: Test and Deploy your Slack Bot

In the left of your editor, click on:

functions > events > slack > command > hello.js

You’ll see a summary of the code for the command /hello

Now click Run Test Event in the bottom right. A Running... dialog will appear that should complete in a few seconds. Afterwards it’ll look like this:

Run your code right in your browser.

Awesome! If we check our Slack workspace in the #random channel we should see this:

Your Slack Bot is live!

If we want to change the payload (sample data) being sent to our bot, we can click Edit Test Event Payload in the top of the editor.

Edit your Slack Payload…

… and configure the JSON data.

Note: Your bot is not yet deployed! Once you’re happy with functionality, to deploy your bot, simply click the Deploy button in the bottom left of the editor:

Click Deploy in the bottom left…

… and your bot will be deployed!

Your API (webhooks) for your Slack app are now live. To test your newly deployed bot, use /cmd hello from Slack. Note that all commands build via the Autocode app require you to prefix command executions with /cmd command-name instead of just using /command-name . The latter is available via custom apps which require a little more setup.

You can now run Slack commands!