-
create a
.env.devfile (get the values from your slack app)SLACK_BOT_TOKEN=<VALUE> SLACK_APP_TOKEN=<VALUE> SLACK_SIGNING_SECRET=<VALUE>
-
create a python venv and install packages using uv (or pip)
uv venv uv add -r requirements.txt
-
in a terminal, run
ngrok http 3000
-
in another terminal, run the app
functions-framework --target=slack_deployment_summary --port=3000
-
to find the
request URL(while ngrok is running)curl http://localhost:4040/api/tunnels
-
update the slack app with the
request URLunder:- Event Subscriptions
- Slash Commands
- Interactivity & Shortcuts
-
update requirements.txt (if needed)
uv export -o requirements.txt --no-dev -
create an .env.yaml file in the format
SLACK_BOT_TOKEN: "<VALUE>" SLACK_APP_TOKEN: "<VALUE>" SLACK_SIGNING_SECRET: "<VALUE>"
-
deploy as a google cloud run function
gcloud functions deploy slack-deployment-summary \ --runtime python311 \ --trigger-http \ --env-vars-file=./.env.yaml \ --allow-unauthenticated \ --entry-point=slack_deployment_summary \ --region=europe-west1
-
request URLwill be in the formathttps://YOUR_REGION-YOUR_PROJECT_ID.cloudfunctions.net/slack-deployment-summary
-
update the slack app with the
request URLunder:- Event Subscriptions
- Slash Commands
- Interactivity & Shortcuts