🚀 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.
To test this integration before moving on to the features, in the input field type in this command:
/slack-announcements- ✅ 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
-
Clone the Repository
git clone https://github.com/your-repo/slack-announcement-integration.git cd slack-announcement-integration -
Install Dependencies
npm install
-
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=
-
Start Application
npm start
-
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; }
-
- GET https://slack-messenger.onrender.com/integration/slack-messages
Fetches messages from the announcement channel on slack
- 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
- Store credentials securely in environment variables
- Implement rate limiting to avoid API abuse
- Node.js & Express - Backend API
- Slack API - Fetching and processing messages
- Axios - Handling API requests
- Dotenv - Managing environment variables
This project is licensed under the MIT License – feel free to modify and use it.