How to get a Slack Message after you Deploy to Firebase Hosting 🚀

Ayesha Khan
2 min readJun 23, 2020

First, we’re going to build your Slack bot.

Go to https://api.slack.com/ and click “Start building”

A pop up like the one above should show up, name your App and select your Development Slack Workspace.

This should lead you to the page above.

Activate Incoming Webhooks to sliding it to “On”

Afterwards, click on “Add New Webhook to Workspace” and then select a channel that you want it to post as an app. This should then give you your webhook URL. Copy the Sample curl request onto a messageSlack.sh file into your app where your firebase.json is stored as well.

On your firebase.json file, add “postdeploy” or you could also change the text in messageSlack.sh to

curl -X POST -H 'Content-type: application/json' --data '{"text":"Just deployed a new feature 🚀"}' 
https://hooks.slack.com/services/{YOUR_WEBHOOK_CUSTOM_URL_}

After the firebase init or before the firebase deploy command, your firebase.json might be overwritten, so make sure to add “postdeploy” to firebase.json again.

Afterward, you should get a message on Slack with your app that you just deployed to Firebase Hosting!

Resources: https://api.slack.com/, https://firebase.google.com/docs/cli

--

--