Skip to content

Repository files navigation

📨 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:

   /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

    git clone https://github.com/your-repo/slack-announcement-integration.git
    cd slack-announcement-integration
    
  2. Install Dependencies

    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

    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

⚙️ 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages