An open API service indexing awesome lists of open source software.

https://github.com/telexintegrations/slack-telex_alert_system


https://github.com/telexintegrations/slack-telex_alert_system

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# πŸ“¨ Slack Announcement Channel Integration (Slack Alert)

πŸš€ **Automate and Forward Slack Announcements to Another Software**

This integration listens to messages posted in a designated Slack **#announcements** channel and forwards them to another system via a webhook or API.

## Quick Test
To test this integration before moving on to the features, in the input field type in this command:
```bash
/slack-announcements
```

## πŸ“Œ Features

- βœ… Fetch messages from Slack’s **#announcements** channel
- βœ… Forward messages to an external API or database
- βœ… Handle retries for failed message deliveries
- βœ… Secure authentication with Slack OAuth tokens

## πŸ› οΈ Installation

1. **Clone the Repository**

```bash
git clone https://github.com/your-repo/slack-announcement-integration.git
cd slack-announcement-integration

```

2. **Install Dependencies**

```bash
npm install

```

3. **Set Up Environment Variables**
PORT=port-number
TARGET_URL=https://slack-messenger.onrender.com/integration/slack-messages
TELEX_CHANNEL_ID=
TELEX_CHANNEL_WEBHOOK=
SLACK_BOT_TOKEN=
SLACK_CHANNEL_ID=
SLACK_API_WEBHOOK=

## πŸš€ Usage

1. Start Application

```bash
npm start

```

2. Fetch Messages Manually

- Request Type:

```
{
channel_id: string;
settings:{
label: string;
type: "text";
description: string;
default: string;
required: boolean;
};
message: string;
};
```

- Response Type:
```
{
message: string;
status: string;
event_name: string;
username: string;
}
```

## πŸ”— End Points

- GET https://slack-messenger.onrender.com/integration/slack-messages
Fetches messages from the announcement channel on slack

## βš™οΈ Configuration

- SLACK_BOT_TOKEN: Required to authenticate API requests from Slack
- SLACK_CHANNEL_ID: Specifies which Slack channel to monitor
- SLACK_API_WEBHOOK: The Slack api url
- Designated Channel ID (TELEX_CHANNEL_ID): The external system where messages are forwarded
- Channel Webhook (TELEX_CHANNEL_WEBHOOK): The external system where messages are forwarded

## πŸ”’ Security Considerations

- Store credentials securely in environment variables
- Implement rate limiting to avoid API abuse

## πŸ› οΈ Built With

- Node.js & Express - Backend API
- Slack API - Fetching and processing messages
- Axios - Handling API requests
- Dotenv - Managing environment variables

## πŸ“œ License

This project is licensed under the MIT License – feel free to modify and use it.