Step 10: Create Weather Slash Command

Step 10: Create a Weather Slash command

1. Go to your Slack developer page

2. Create a /weather slash command for OpenWeatherBot

  • Click on Slack Commands in the left side panel and then press the button labeled Create New Command

    inline

  • Next fill out the form with the following information and press the “Save” button:

    • Command: weather
    • Request URL: [YOUR NGROK HTTPS URL]/weather
    • Short Description: Get the current weather of a U.S. based city
    • Usage Hint: /[city name]

    inline

    • We are creating a slash command called weather, when initiated in Slack, this command will make a POST request to our server using the ngrok https url for our app (remember the ngrok url is unique to your server)