Integrations
Email
Cloudflare Email

How to send email with Cloudflare Email

How to send transactional email notifications with Cloudflare Email Service and Knock.

Knock supports using Cloudflare Email Service to send email notifications to your users.

Features

#
  • Knock link and open tracking
  • Per environment configuration
  • Sandbox mode

Getting started

#
  1. In the Cloudflare dashboard, create an API token (or use a compatible API key) with permission to send email for your account, and copy your Cloudflare account ID. See Cloudflare's API token documentation and how to find your account ID.
  2. In Knock, open Channels and sources in your account settings and create a Cloudflare Email channel.
  3. For each environment, enter your API key (your Cloudflare API token or key), Account ID, and From email address. You can enter these when you create the channel, or later by expanding the environment on the channel's page. Use addresses on domains you have verified for sending in Cloudflare.

Channel configuration

#

Configure the following settings per environment. Navigate to Channels and sources in your dashboard account settings and select your Cloudflare Email channel. Under Environment configurations, click the environment you'd like to configure to expand its settings, then click "Save changes" when you're done. Expand Advanced for additional options, including overrides and conditions.

Fields marked with an * are required.

API keystring*

Your Cloudflare API token or API key with permission to send email for this account.

Account IDstring*

Your Cloudflare account ID. Used with Cloudflare's email sending API.

From email addressstring | liquid*

The default sender email address (can use Liquid tags). Must use a domain you have configured for sending in Cloudflare.

Sandbox modeboolean

Whether to enable sandbox mode for your Cloudflare Email channel.

Open trackingboolean

Whether to enable Knock email-open tracking.

Link trackingboolean

Whether to enable Knock link-click tracking.

CSS inliningboolean

Whether Knock will inline CSS styles in your emails onto their associated HTML elements before sending, to improve email client compatibility. Defaults to true.

When configured, these optional overrides will apply to all emails sent from this channel in the configured environment. See Settings and overrides for more on email channel overrides.

From namestring | liquid

The default sender name (can use Liquid tags).

Tostring | liquid

The To email address that email notifications will be sent to (can use Liquid tags). This value will override the designated recipient's email address.

Ccstring | liquid

The CC email address that email notifications will be sent to (can use Liquid tags).

Bccstring | liquid

The BCC email address that email notifications will be sent to (can use Liquid tags).

Reply-tostring | liquid

The reply-to email address that will be included on email notifications (can use Liquid tags).

Payload overridesJSON (string) | liquid

Provide a JSON object to merge into the API payload that is sent to the downstream provider.

Set optional per-environment conditions for this channel. These conditions are evaluated each time a workflow run encounters a step that uses this channel in the configured environment. If the conditions are not met, the step will be skipped.

Recipient data requirements

#

To send an email notification you'll need a valid email property set on your recipient.

New chat