Skype - Weather bot
  • 20 Jan 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Skype - Weather bot

  • Dark
    Light
  • PDF

Article Summary

Clone "WeatherBot" folder

skype_copy

Folder contains WeatherBot process. It accepts webhooks.

Sends information about Bot to the new contact.

Receives air temperature by city name and sends a message.

In case if message does not contain city name or city is specified incorrectly, also if there is some error in process, bot sends appropriate message.

Also WeatherBot defines bot remove action and sends to Bot removed. node.

Webhook set up

1) Create the app. Receive AppID and AppSECRET.

2) Connect WeatherBot process to Skype Bot by specifying AppID and AppSECRET of your application

skype_connect

skype_connect_1

2) Receive WeatherBot process url for Skype Bot

skype_connect_2

(if AppID and AppSECRET are specified correctly) in your Corezoid account will be automatically added Skype token folder with two processes - Get token and Get token

After establishing the connection successfully

Get token - receives access_token for Skype API and renews it after expiration date, transfers valid access_token to Token storage state diagram.
Skype Token - state diagram is designed for receiving access_token via the construction:

    {{conv[{{diag_id}}].ref[{{ref}}].parameter_ID}}

3) Create a bot

In Microsoft App ID field, specify AppID.

In Messaging endpoint field - received url of WeatherBot process.

4) Publish your Bot (button Publish)

In order to make your Bot public, you need to follow the guideline and agreement. Also you need to specify the links to your Privacy statement and Terms of service.

Integration with OpenWeatherMap

For user's comfort, we added a test access key for OpenWeatherMap API to "WeatherBot" template. To get your access key for OpenWeatherMap API, follow link and register.

In Get weather by city node replace test OpenWeatherMAP API key by the one you received in APPID parameter's value.
skype_appid

Testing and launch

Just add your Bot to Skype by link or from bot's catalog (if bot has been published) and start chatting.
botweather_view(1)

Switch to View or Debug mode to see request flow, their transit and process nodes distribution.
skype_fin

For the time your Bot is not published (Status = In review), its functionality is available for the limited amount of users.

Was this article helpful?

What's Next