Mailhook logo
Cloudflare D1 logo

Workflow template

Index incoming email in Cloudflare D1

Store the ID, subject, and date of each email received by the private Mailhook. Create a D1 mail_deliveries table with message_id TEXT PRIMARY KEY, subject TEXT, and received_at TEXT. Duplicate message IDs reuse the existing record. The table excludes bodies and attachments.

How it works

Workflow steps

1 Trigger · 1 Action
Mailhook1 · Trigger

New inbound email

Start when an email arrives at the workflow’s FastHook address.

Cloudflare D12 · Action

Record the received email once

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. Copy the template

    Open the template in FastHook to create an editable Workflow Draft.

  2. Connect your accounts

    Connect your accounts for Mailhook, Cloudflare D1.

  3. Review the Workflow

    Review the Steps, field mappings, routes, and provider settings.

  4. Activate

    Activate the Workflow when the Draft is ready, then verify a test run.

Questions about this template

Does the template copy someone else's credentials?

No. FastHook creates a disconnected Draft. Connect your own Mailhook, Cloudflare D1 accounts before activation.

Can I change the Steps and mappings?

Yes. The copied Workflow is an editable Draft. Review every Step, input, mapping, and route before you activate it.

What is copied into my workspace?

FastHook recreates the Trigger configuration, Action Steps, routes, and mappings with new IDs. Provider accounts, credentials, and secrets are never copied.

When does the Workflow start running?

Only after you connect the required accounts, finish the configuration, and explicitly activate the Draft.

Explore connected apps