cloudflare_get_latest_invoice
Obtain the most recent Cloudflare billing item with cost and date, and optionally convert USD amounts to EUR using historical exchange rates for automated bookkeeping.
Instructions
Get the most recent Cloudflare billing item.
Fetches the latest billing item with cost and date. When convert_to_eur is True (default), automatically converts USD amounts to EUR using historical exchange rates from the European Central Bank.
Returns invoice with:
amount: Original amount (usually USD)
currency: Original currency code
amount_eur: Converted EUR amount (when conversion enabled)
amount_cents_eur: EUR amount in cents (ready for OpenCollective)
exchange_rate: Rate used for conversion
rate_date: Date the exchange rate was fetched
Requires CLOUDFLARE_API_TOKEN to be set.
Useful for automated monthly bookkeeping: fetch the latest Cloudflare bill and then use oc_create_expense to submit it to OpenCollective.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No | ||
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |