This Google Cloud Function is based on the example and sends a notification to a Slack channel using incoming webhooks.
To deploy, run:
gcloud functions deploy billingAlert --gen2 --trigger-topic monthly-budget --runtime nodejs20 --set-env-vars "SLACK_WEBHOOK_URL=https://hooks.slack.com/…"