Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technologiestiftung/open-data-ckan-slackbot
Slackbot that queries the CKAN API of Berlin's open data portal for new datasets
https://github.com/technologiestiftung/open-data-ckan-slackbot
odis
Last synced: 30 days ago
JSON representation
Slackbot that queries the CKAN API of Berlin's open data portal for new datasets
- Host: GitHub
- URL: https://github.com/technologiestiftung/open-data-ckan-slackbot
- Owner: technologiestiftung
- License: mit
- Created: 2023-02-05T14:31:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T17:52:06.000Z (7 months ago)
- Last Synced: 2024-06-11T18:22:29.898Z (6 months ago)
- Topics: odis
- Language: TypeScript
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiestiftung%20Berlin-blue)
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
# Open Data CKAN Slackbot
This is a netlify function for a Slackbot that queries the CKAN API of [Berlin's data portal](https://daten.berlin.de) for new datasets and for updated datasets. It's written in TypeScript, using the Bolt JS framework.
It can be triggered via specific keywords in Slack messages. Also, it responds to the slash command /opendata [number of days] and then displays the new and updated records for the queried number of days.## Prerequisites
- [Netlify](https://www.netlify.com) Account
- [Slack](https://slack.com/intl/de-de/) Account and Workspace## Installation
* Run `npm install` to install all node dependencies.
* Install Netlify CLI globally using the command `npm install netlify-dev -g`.
* To run this function locally, you'll need to link your Netlify site with your repository. Easiest way is to create a `.netlify` folder and inside that, create a `state.json` file with the following contents. Get your site id or API id from the site settings and paste it here. Then run the command `netlify link`.
```json
{
"siteId": "PASTE YOUR API ID HERE"
}
```
* Run `netlify build` to build your code and generate a function. This command uses the settings in the `netlify.toml` file to run a build command. The build command compiles TypeScript files into JavaScript and automatically creates the required `netlify/functions` folder for you and places the `index.js` function file inside this folder.
* Run `netlify dev` to start a local development server to test your function. If the local server starts at port 8888, then the URL to access this function is `http://localhost:8888/.netlify/functions/index`.## Usage or Deployment
There are several steps necessary to get the Slackbot running.
- deploy the function to netlify
- integrate Slack by creating a Slack app, grabbing the credentials and integrating it into the function so that the function can communicate with the Slack app
- configure the slack app to subscribe to events and to implement the slash commandAll this steps are described in the Medium article ["Creating a Slack Bot Using Netlify Functions"](https://levelup.gitconnected.com/creating-a-slack-bot-using-netlify-functions-465d2a981686) by Clyde D'Souza. You can follow the tutorial to get the app running and to deploy it.
## Contributing
Before you create a pull request, write an issue so we can discuss your changes.
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Lisa-Stubert
π π» π€
Fabian MorΓ³n Zirfas
π§βπ«
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Credits