# Report R2 bucket storage to Discord

Post a daily report of object counts and bytes in one selected R2 bucket, grouped by storage class.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=cloudflare-r2-storage-report-to-discord&templateName=Report+R2+bucket+storage+to+Discord)

**Required accounts**

- Cloudflare R2
- Discord

## Report R2 bucket storage to Discord

### 1. Trigger · Daily storage report

**Schedule**. Run automatically on the configured schedule.

### 2. Action · Read storage in the selected bucket

**Cloudflare R2**. Count the objects and bytes in a selected bucket, grouped by storage class. Reads each page of object metadata.

### 3. Action · Post the storage report

**Discord**. Send rich content, files, a poll, or a reply to a channel.

## Set up your workflow

1. **Choose a single bucket** In the storage-report action, select the bucket to measure. Use a connection with permission to list objects in that bucket.
2. **Set the reporting schedule** Choose the interval and timezone. The report lists object count and bytes and groups storage by class.
3. **Verify the destination and totals** Connect Discord, choose a test channel and allow the bot to send messages. Compare the first report with the contents of the same bucket, including an object of known size.

## Related integrations

- [Schedule trigger](https://www.fasthook.io/docs/triggers/schedule)
- [Cloudflare R2 integrations](https://www.fasthook.io/apps/cloudflare-r2/integrations)
- [Discord integrations](https://www.fasthook.io/apps/discord/integrations)

## Related workflow templates

- [Alert Discord when DNSSEC is not active](https://www.fasthook.io/templates/cloudflare-dnssec-status-to-discord.md): Check the signing status Cloudflare reports for one zone.
- [Archive DNS records to R2 on a schedule](https://www.fasthook.io/templates/cloudflare-dns-zone-exports-to-r2.md): Save a dated BIND zone file in a private R2 bucket.
- [Back up a group of KV keys to R2](https://www.fasthook.io/templates/cloudflare-kv-prefix-backups-to-r2.md): Export a selected prefix with binary values, metadata and absolute expiry times.
- [Archive a daily D1 SQL export in R2](https://www.fasthook.io/templates/cloudflare-d1-backups-to-r2.md): Export database schema and data as SQL and save a dated copy in the selected R2 bucket.
- [Send a Cloudflare Images storage report to Discord](https://www.fasthook.io/templates/cloudflare-images-storage-report-to-discord.md): On the daily schedule, read the number of hosted originals and the account allowance, then post both numbers in the selected Discord channel.
