A lightweight, serverless middleware designed for Cloudflare Workers that forwards Ko-Fi donation alerts to a Discord channel via Webhooks.
- Click the green Code button at the top of this repository and select Download ZIP.
- Extract the files to your machine.
- Open
worker.jsin your preferred text editor. - Locate the line:
const DISCORD_WEBHOOK = "INSERT_WEBHOOK_HERE"; - Replace
INSERT_WEBHOOK_HEREwith your actual Discord Webhook URL. - Save the file.
- Log in to your Cloudflare Dashboard.
- Navigate to Compute > Workers & Pages.
- Click Create application.
- Click the Start With Hello World.
- Give your worker a name (e.g.,
kofi-discord-webhook) and click Deploy.- Note: This deploys a default "Hello World" script. We will replace it in the next step.
- On the success screen, click Edit Code.
- In the online editor, delete all the existing code.
- Copy and Paste the entire contents of your modified
worker.jsinto the editor. - Click Save and Deploy in the top right.
- Click the back arrow or "Worker" name at the top left to return to the summary. Copy the URL (e.g.,
[https://worker-name.subdomain.workers.dev](https://worker-name.subdomain.workers.dev)) for the final step.
- Go to your Ko-Fi Dashboard.
- On the sidebar, Select More > API.
- In the Webhooks section, paste your Cloudflare Worker URL.
- Click Update or Save.
