Cloudflare

Cloud API token

Manage zones, DNS, workers, R2 and the rest of the Cloudflare API from any Windmill script, flow or app.

Set up in 3 steps

1

Create an API token

In the Cloudflare dashboard, open My Profile then API Tokens. Create a token, granting only the permissions and zones your scripts need, and copy it.

2

Add the resource in Windmill

Open Resources, add a resource of type cloudflare, and paste the token. account_id is there for scripts that need it in a path; leave email and key empty.

3

Run your first script

Fork any script below and list your zones. There are over a thousand here, so search by the verb you need.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

Resource type

cloudflare — the shape of the credential every script on this page expects.

View raw schema →
FieldTypeRequiredWhat it is
tokenstringYes
account_idstringNo
emailstringNodeprecated
keystringNodeprecated

Questions

What are the email and key fields?

The legacy Global API Key pair, kept for older scripts and marked deprecated. It authenticates as your whole account with no scoping — use an API token instead.

A call returns 403 on one zone but works on another

API tokens are scoped per zone and per permission. Edit the token in Cloudflare to include the zone, rather than widening it to everything.

Is my token stored on the hub?

Never. It lives only in your own Windmill workspace, encrypted at rest.