Webhook logo
Cloudflare Origin CA logo
Cloudflare D1 logo

Workflow template

Record origin certificate details in D1

Look up a certificate by serial number and refresh its hostname and expiry record in D1.

How it works

Record origin certificate details in D1

1 Trigger · 2 Actions · 1 Transformation
Webhook1 · Trigger

Certificate inventory update requested

Receive a JSON submission from your existing form backend at this Workflow's private webhook URL.

Cloudflare Origin CA2 · Action

Read the certificate from Cloudflare

Read the hostnames, expiration date and signed certificate for a specific serial number.

FastHook3 · Transformation

Prepare the inventory record

Run JavaScript to prepare data for the next workflow step.

Cloudflare D14 · Action

Insert or refresh the certificate record

Run a statement with bound values, or send a batch. Each row in the results uses the column names from your query.

Before activation

Set up your workflow

  1. Prepare the inventory table

    In your target D1 database run CREATE TABLE IF NOT EXISTS origin_certificates (serial TEXT PRIMARY KEY, details TEXT NOT NULL).

  2. Choose the database

    Connect the Origin CA zone and select the destination D1 database. The workflow records hostnames and dates under the full serial number.

  3. Refresh a record

    POST certificate_id as a quoted string to the private webhook. Repeat the request and confirm the row count stays the same.

Explore connected apps