Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

lmzdev/rocketchat-openweather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

OpenWeatherMap Integration for Rocket.Chat

This is a very simple integration which makes use of the free OpenWeatherMap.org API to retrieve current weather data.

Prerequisites

  • You need an API-Key from OpenWeatherMap.org, sign up here and create as many keys as you want.

Setup

  • Go to 'Integrations' in your Rocket.Chat-Admin-Panel and create a new 'Outgoing Webhook'
  • Select 'Message sent' as trigger and specify keyword(s), e.g. !weather
  • Enter all_public_channels,all_private_groups,all_direct_messages as 'Channel' to make it work everywhere
  • Insert https://api.openweathermap.org/data/2.5/weather as 'URL'
  • Insert your API Key as 'Token'
  • Copy&Paste the above JavaScript-File into the 'Script' field
  • Set Integration and Script to enabled
  • Save changes!

Usage

  • If anyone sends !weather <city> the rocket.cat should respond with the current weather conditions in that particular city (if it exists to OWMs databases).
  • Feel free to modify the Code to your needs. You may find it useful to tweak things like the default city, locale settings, the presentation or the weather data used.

Refer to https://openweathermap.org/current for further information on how to use the API. Have Fun!

Releases

No releases published

Packages

No packages published