A Cloudflare Worker using KV and CRON trigger for checking and sending Audit Logs to Slack. 🚀
A Cloudflare Worker using KV and CRON trigger for checking and sending Audit Logs to Slack. Using Cloudflare Workers, CRON Triggers, and KV storage. 🚀
You’ll need a Cloudflare Workers account (Free Tier is enough)
Prepare the following secrets
Account Logs:Read
and Account Settings:Read
permissions (yes, both needed)Navigate to your new GitHub repository > Settings > Secrets and add the following secrets:
- Name: CF_API_TOKEN (should be added automatically)
- Name: CF_ACCOUNT_ID (should be added automatically)
- Name: SECRET_CLOUDFLARE_API_TOKEN
- Value: your-read-cloudflare-api-token
- Name: SECRET_SLACK_WEBHOOK_URL
- Value: your-slack-webhook-url
Navigate to the Actions settings in your repository and enable them
Max 10 message blocks in Slack message.
It just might take a while to catch up with all the audit logs from a current day once you deploy the Worker.