Corezoid MarketplaceCorezoid Marketplace
40Processes
1239Downloads
toggle menu
Slack WeatherBot
Messengers
0
963
6
0
With this Slack WeatherBot you can get weather, when you enter the city name.
Additional information
Version:
 1
Create:
 May 30, 2017
Update:
 May 30, 2017
Click to rate:

Authorization in SLACK

  1. Create your Slack Team by the link.

  2. Put your email and press Create New Team. You will receive a confirmation code to the specified email.

  3. After this, follow next steps and you will create your Team domain.

Next, you can send invitation by specified email to those with whom you want to talk in your team with or invite by pressing +Invite people to application.

Url, Slash commands and Webhook

1.Then go to Slack API- select Start building custom integration:

Then select Set up an incoming webhook-Add Configuration

2.Create new Channel or select from offered list (two channels by default - #general and #random):

3.You receive Webhook URL, that helps to send messages in Slack from any service

4.Select Set up a slash command-Add Configuration and put into field command name that starts from "/", for example, /weather

When user puts "/weather" command, Slack sends a request to set up URL-address and wait for reply from service by this URL

5.Then, put received webhook to the form, fill out other forms and press Save Integration.

Slack also allows to create your Bot Set up a bot user- Add Configuration and specify his username:

Fill out Integration Settings for Bot - his short description, what he can do, icon etc. Then you can invite your bot to the channel in settings:

But in this example we used Slash commands for our Bot's creation. It can be used for conversation with friend or any #channel.

WeatherBot creation

Click Use this process and template of this process "WeatherBot_SLACK" will copy in your environment.

In "WeatherBot_SLACK" process, in Set APPID_key node, in variable's value:

  • APPID - put access test key of OpenWeatherMap API.

Webhook sets up

Connect WeatherBot process to SLACK using webhook-url. In order to get webhook-url of WeatherBot process, select "Connect to messenger":

You will get webhook-url of WeatherBot process for SLACK for Slash Commands or Event Subscriptions. In this case, we select webhook for Slash Commands:

Specify received process' webhook-url in Integration Settings for Command in URL field, more detailed description is in "Url, Slash commands and Webhook"

What WeatherBot does

WeatherBot - receives webhook-s with city name, receives air temperature by it and sends a message

In case if message does not contain city name or city is not specified correctly and also if the process has a mistake, sends an appropriate message.

Integration with OpenWeatherMap

For user's comfort there was test access key for OpenWaetherMap API added to template "WeatherBot_SLACK".

In order to receive your access key for OpenWeatherBot API, go to the link and register.

In "Set APPID_key" node replace test key for OpenWeatherMap API by received one in APPID parameter value.

Testing and Launch

Just add your friends to your Slack team and start chatting with any friend or in any #channel with /weather [city name] command.

You can use Bot in Slack mobile app:

Go to View or Debug mode in order to see request flow, their moving and distribution by the process nodes.

Read more

Similar processes

Viber Public Account "Get Weather"
Viber Public Account "Get Weather"
Messengers
0
FREE
1080
10
0
Telegram BitcoinBot
Telegram BitcoinBot
Messengers
1
FREE
3187
109
0
SendPulse
SendPulse
Messengers
0
FREE
1431
6
0
Skype BitcoinBot
Skype BitcoinBot
Messengers
0
FREE
1028
5
0
Twitter Search tweets
Twitter Search tweets
Messengers
0
FREE
836
3
0
Line WeatherBot
Line WeatherBot
Messengers
0
FREE
986
1
0
2020 © Corezoid.com. Middleware Inc., 541 Jefferson Avenue, Suite 100, Redwood City, CA 94063. All rights reserved. Patent protected. Powered by Erlang | Terms & Conditions