To use this app, you will need to create a Slack webhook URL and set it as an environment variable in the docker-compose.yml
file.
- Go to the Slack API website.
- Click the "Create New App" button.
- Enter a name for your app and select the workspace where you want to install it.
- Click the "Incoming Webhooks" feature and enable it.
- Click the "Add New Webhook to Workspace" button and authorize the app to access your Slack workspace.
- Select the channel where you want to receive notifications and click the "Allow" button.
- Copy the webhook URL that is displayed on the page.
- Set the
SLACK_WEBHOOK_URL
environment variable in thedocker-compose.yml
file to the Slack webhook URL that you copied earlier.
- Install Docker and Docker Compose on your computer.
- Open a terminal and navigate to the root directory of the project.
- Run the following command to start the app:
docker-compose up --build
- The app will start running on port 3000. You can access it by opening a web browser and navigating to
http://localhost:3000
.
That's it! You should now be able to receive Slack notifications when a spam notification is detected in the app. If you have any questions or issues, please feel free to contact me.
You can use the following command to test the application once running
curl --request POST --header 'Content-Type: application/json' --data '{"Email":"test@gmail.com","Type":"SpamNotifcation"}' localhost:3000/notify