Skip to content

SlackNewsBot is a Python application that automatically fetches and posts the latest Israeli news headlines to your Slack channel, keeping your team informed and engaged directly within your workspace.

Notifications You must be signed in to change notification settings

OrenGrinker/SlackNewsAPI

Repository files navigation

SlackNewsBot

SlackNewsBot is a Python script that fetches the top news headlines from Israel using NewsAPI and posts them to a specified Slack channel.

Setting Up

Prerequisites

  • Python 3.x
  • requests library
  • slack_sdk library

Installation

  1. Clone this repository or download the files.
  2. Install the required Python libraries:

pip install -r requirements.txt

Configuring Slack

  1. Create a new Slack app at Slack API.
  2. Add permissions to the app: chat:write.
  3. Install the app to your workspace and note the OAuth token (begins with xoxb-).
  4. Find the ID of the Slack channel where you want to post the news.

Configuring NewsAPI

  1. Sign up at NewsAPI and get your API key.

Setting Up the Application

  1. Navigate to the config.py file.
  2. Replace YOUR_NEWSAPI_KEY, YOUR_SLACK_BOT_TOKEN, and YOUR_SLACK_CHANNEL_ID with your actual NewsAPI key, Slack bot token, and Slack channel ID, respectively.

Running the Application

To run the application, execute the following command in the terminal:

python main.py

The script will fetch the latest news from Israel and post it to the specified Slack channel.

Screenshot

SlackNewsBot Screenshot

About

SlackNewsBot is a Python application that automatically fetches and posts the latest Israeli news headlines to your Slack channel, keeping your team informed and engaged directly within your workspace.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages