SFDS slack-microservice-py was developed for CCSF to send Slack messages.
- please refer to DS microservice template for instructions to future development of this project.
The Slack Microservice takes in a JSON object, parses through the parameters and sends the messages to a DS Slack channel.
Please refer to [data-sample.json] (https://github.com/SFDigitalServices/slack-microservice-py/blob/main/data-sample.json) for sample request
- For file uploads to work, you will need to add the slack microservice bot to the channel you're posting to.
The response is also a JSON object that looks like this:
{"status": "fail", "data": {"message": "Failed to post file, error: Failed to post file"}
Running it locally
curl --location --request POST 'http://127.0.0.1:8000/slack-notification' --header 'ACCESS_KEY: 123456' --header 'Content-Type: text/plain' -d @data-sample.json