Cloudflare D1 logo

Databases

Cloudflare D1 Integrations

Connect queues, forms and scheduled workflows to a Cloudflare D1 database. Run SQL with bound values, route work using lookup tables and archive database exports.

Then take action

Cloudflare D1 Actions

25 Actions

Choose what your workflow does in Cloudflare D1.

Analyze database activity

Compare database queries, rows read and rows written over the selected period.

Analyze SQL query performance

Group query measurements by time, database and the dimensions you select.

More actions

Change query insights settings

Update the account settings that control how D1 collects query insights.

Change selected database settings

Apply just the settings supplied in this request to the selected database.

Compare database performance

Rank databases by the selected performance measure over a chosen time range.

Create a database

Name a new database and choose its location and read replication settings.

Delete a database

Remove the selected database from the connected Cloudflare account.

Explore database analytics columns

Look up dataset columns and types before writing a query against the analytics service.

Explore database request logs

Query recorded database requests for the selected period using SQL.

Explore SQL query logs

Query D1 statement activity over a selected time range.

Export a database as a SQL file

Wait for the database export and return its SQL file for a storage step. Use the bookmark action for larger exports.

Find a database recovery point

Get the bookmark for the database at a given time so you can review the point before restoring.

Find costly SQL queries

Review recorded queries for the selected database and time range, ordered by the measure you choose.

Find database tuning recommendations

Read suggestions for improving queries on the selected database and follow the cursor for additional results.

Find databases in an account

Browse a page of databases or filter the list by name.

Read database details

Look up the name, size and configuration of a selected database.

Read query insights settings

Check how query insights are configured for the connected account.

Recover a deleted database

Restore a recently deleted database by its ID. Choose a new name if the original name is taken.

Replace database settings

Supply the full configuration for the selected database.

Restore a database to a recovery point

Rewind the selected database to a bookmark or timestamp within its recovery window.

Ready-made Cloudflare D1 Workflows

8 total

Start with a published template and adapt it to your work.

Browse all templates →
Cloudflare D1 →
More templates

Cloudflare D1 setup notes

  • Connect a Cloudflare account Enter your account ID and a D1 API token. Cloudflare grants D1 permissions at account level. Use a separate account when you need credentials isolated from production databases.

  • Choose the database for each action Select a database and bind incoming values to SQL placeholders. A unique event ID lets a queue consumer receive the same business event again safely.

  • Query analytics and recover data Analytics actions require the relevant Analytics Read permission. Time Travel availability depends on the recovery window for your database. Test restoration on a dedicated database.