Optional tokens and secrets
amabledata works without any of the credentials on this page. Each one unlocks one feature; without it, that feature is either unavailable or done by hand. Add them one at a time, when you need them.
Overview
Section titled “Overview”| Credential | Unlocks | Without it | Cloud edition |
|---|---|---|---|
CLOUDFLARE_DNS_API_TOKEN |
The domain wizard creates DNS records, Workers custom domains and routes for you | The wizard shows the records and you create them yourself | Configured by the installer |
CF_ZONE_ID, CF_API_TOKEN, TRACKING_CNAME_TARGET |
Tracking domains whose DNS stays at another provider (CNAME mode) | Only tracking domains that are zones of the same Cloudflare account (zone mode) | Depends on the installation |
| Ad platform apps (Meta, Google Ads, TikTok) | Ad spend import and server-side conversions | The platform shows as unavailable | Ready to use |
| Google OAuth client | Google Calendar for bookings: busy time read, bookings written as events | Connect Google Calendar is unavailable | Ready to use |
| Turnstile keys | Bot protection on sign-in and public forms | Verification disabled (a warning is logged) | Created by the installer |
| Marketing email provider key | Sending broadcasts and automation emails | Marketing email cannot be sent | Provided, 2,000 emails/month per workspace included |
| System email binding | Sign-in codes, magic links, invitations, password resets by email | Those emails cannot be sent | Provided |
ERROR_REPORTING |
Error reports to your own HTTPS endpoint | Errors are written to the Worker logs only | Fleet monitoring |
ADDRESS_LOOKUP_URL |
Your own address autocomplete server, or turning it off | The public geocoder is used | Same |
All of this applies mainly to self-hosted installations. In the Cloud edition these services are provided centrally or configured by the installer.
How it works
Section titled “How it works”amabledata selects each outside service by configuration. When a credential is present and valid, the feature turns on; when it is missing, the feature degrades on its own and nothing else breaks. Non-secret identifiers (an app ID, a zone ID, a URL) are plain variables; passwords, keys and tokens are secrets. See the configuration reference for every variable.
Step by step
Section titled “Step by step”DNS automation token (CLOUDFLARE_DNS_API_TOKEN)
Section titled “DNS automation token (CLOUDFLARE_DNS_API_TOKEN)”With this token, Settings › Domains shows DNS changes are applied on your Cloudflare zone automatically. and offers Create on Cloudflare. Without it, it shows No Cloudflare API token is configured: create the records below on your DNS provider.
-
In Cloudflare, go to My Profile › API Tokens › Create Token › Create Custom Token.
-
Name it
amabledata domains. -
Add these permissions:
Scope Permission Level Used for Zone Zone Read Finds the active zone that covers the hostname Zone DNS Edit Creates or updates the records of sending domains (SPF, DKIM, DMARC and similar) Zone Workers Routes Edit Adds the routes of a landing and booking site served on some paths of an existing site Account Workers Scripts Edit Attaches a tracking hostname or a whole site hostname to the edge Worker as a Workers custom domain -
Account Resources: Include › your amabledata account. Zone Resources: Include › All zones from an account › your amabledata account.
-
Create the token and copy it (it is shown once).
-
Store it on the core Worker:
Terminal window pnpm exec wrangler secret put CLOUDFLARE_DNS_API_TOKEN --config apps/core/wrangler.self-host.jsonc -
Reload Settings › Domains in amabledata: the automatic mode message appears.
Optional related variables: EDGE_HOSTNAME (the hostname custom domains point to, default: the host of EDGE_ORIGIN) and EDGE_SCRIPT_NAME (the Worker used for custom domains and routes, default amable-edge).
CNAME tracking domains (CF_ZONE_ID, CF_API_TOKEN, TRACKING_CNAME_TARGET)
Section titled “CNAME tracking domains (CF_ZONE_ID, CF_API_TOKEN, TRACKING_CNAME_TARGET)”By default a tracking domain must be a zone of the same Cloudflare account as the edge Worker (zone mode, recommended, no configuration). CNAME mode lets the owner of a domain keep its DNS elsewhere and only add a CNAME record: amabledata then creates a custom hostname on a zone of yours with Cloudflare for SaaS, and Cloudflare issues the certificate. Without these three values the option shows Not configured on this installation: the domain must be a zone of this Cloudflare account.
-
Choose the zone that serves the edge Worker (for example
example.net, wheretrack.example.netpoints atamable-edge), and enable Cloudflare for SaaS custom hostnames on it (in the zone: SSL/TLS › Custom Hostnames), following Cloudflare for SaaS: get started. Custom hostnames are billed by Cloudflare beyond the included quantity. -
Copy the Zone ID of that zone (zone Overview › API section).
-
Create a custom token with Zone › SSL and Certificates › Edit, Zone Resources: Include › Specific zone › that zone. Copy it.
-
Set the values on the core Worker:
Name Type Value CF_ZONE_IDVariable The Zone ID from step 2 CF_API_TOKENSecret The token from step 3 TRACKING_CNAME_TARGETVariable, optional The hostname customers point their CNAMEat, for exampletrack.example.net. Default: the host ofEDGE_ORIGIN.Terminal window pnpm exec wrangler secret put CF_API_TOKEN --config apps/core/wrangler.self-host.jsoncAdd
CF_ZONE_IDandTRACKING_CNAME_TARGETto thevarsblock ofdeploy/self-host/core.wrangler.jsonc, then rerunpnpm self-host:setup --deploywith your usual options. -
In amabledata, Analytics settings (
/t/<workspace>/analytics/settings) › Domains tab › Add domain now offers DNS stays elsewhere (CNAME). The status moves from Waiting for DNS to Issuing certificate to Active.
See CNAME tracking domains for the day-to-day use.
Ad platform apps
Section titled “Ad platform apps”Each platform needs an OAuth app that you create on the platform’s developer site (self-hosted). The redirect URI to register on each app is <APP_ORIGIN>/oauth/ads/callback, for example https://crm.example.com/oauth/ads/callback, and it must match exactly.
| Platform | Secrets on the core Worker | Notes |
|---|---|---|
| Meta | META_APP_ID, META_APP_SECRET |
Spend import and Conversions API |
| Google Ads | GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN, optional GOOGLE_ADS_LOGIN_CUSTOMER_ID |
The login customer ID is a manager account, digits only (dashes are removed) |
| TikTok | TIKTOK_APP_ID, TIKTOK_APP_SECRET |
Spend import and Events API |
| All | Optional variable ADS_OAUTH_REDIRECT_URI |
Overrides the default redirect URI |
A platform without both its ID and secret (and, for Google Ads, the developer token) shows as unavailable. Step-by-step guides for each platform: OAuth apps.
Google OAuth client (Calendar)
Section titled “Google OAuth client (Calendar)”-
Create a Google Cloud project, enable Google Calendar API, and configure the OAuth consent screen with the scopes
calendar.readonly(busy time) andcalendar.events(bookings written as events). -
Create an OAuth client ID of type Web application with the authorized redirect URI
<APP_ORIGIN>/oauth/google/callback(fixed path). -
Store the values on the core Worker:
GOOGLE_OAUTH_CLIENT_ID(variable or secret) andGOOGLE_OAUTH_CLIENT_SECRET(secret). -
After the deploy, Connect Google Calendar appears on booking calendars.
Grants are encrypted with the installation key (AUTH_ENCRYPTION_KEY) before being stored. The Google Sheets form connection does not use this client: each workspace uploads its own service account key (Form connections). Full guide: OAuth apps.
Turnstile keys
Section titled “Turnstile keys”-
In Cloudflare, open Turnstile in the account sidebar and select Add widget.
-
Name it
amabledata, add the hostnames of your app and of your public pages (for examplecrm.example.com,t.example.com, and theworkers.devhostnames if you use them), and choose the Managed mode. -
Copy the Site Key and the Secret Key.
-
Set
TURNSTILE_SITE_KEY(variable) andTURNSTILE_SECRET_KEY(secret) on the core Worker.
Without the secret, verification is disabled and the Worker logs TURNSTILE_SECRET_KEY missing — bot verification disabled at boot.
Marketing email provider
Section titled “Marketing email provider”Self-hosted installations send marketing email through their own PostShiba account. The first three settings are all required:
| Name | Type | Purpose |
|---|---|---|
POSTSHIBA_API_KEY |
Secret | Team API key of your account, with Full access |
POSTSHIBA_TEAM_ID |
Variable | Your team id (the team_id returned by the PostShiba API GET /users/me) |
POSTSHIBA_CLUSTER_ID |
Variable | The cluster on which the workspaces’ SMTP credentials are issued |
POSTSHIBA_BASE_URL |
Variable, optional | API root override (default https://app.postshiba.com/api/v1) |
POSTSHIBA_INJECT_URL |
Variable, optional | HTTP inject endpoint of your cluster (default https://inject.postshiba.com/api/inject/v1) |
POSTSHIBA_WEBHOOK_SECRET |
Secret, optional | Extra comma-separated secrets accepted on delivery webhooks; normally not needed |
Set the key with wrangler secret put and the two ids in the vars block of deploy/self-host/core.wrangler.jsonc (they are already there, commented out), then rerun pnpm self-host:setup --deploy. You create nothing else at PostShiba: each workspace gets its own PostShiba tenant, SMTP credential and delivery webhook (with its own secret) when it connects its first sending domain in Settings › Domains. Removing a sending domain in amabledata deletes it at PostShiba too. See Email sending settings and the configuration reference.
System email (your own Cloudflare Email Sending)
Section titled “System email (your own Cloudflare Email Sending)”System emails (sign-in codes, magic links, invitations, password resets, role change notices, and the notice sent to the sender when someone declines to sign a document) need a sender:
-
Onboard your domain to Cloudflare Email Sending, for example with
pnpm exec wrangler email sending enable example.com. -
In
deploy/self-host/core.wrangler.jsonc, uncomment the binding"send_email": [{ "name": "SYSTEM_EMAIL" }]. -
In the same file, set the variable
SYSTEM_EMAIL_FROM(for exampleno-reply@example.com) and optionallySYSTEM_EMAIL_FROM_NAME. -
Rerun
pnpm self-host:setup --deploywith your usual options.
Without it, system emails fail with System email is not configured: add a send_email binding named SYSTEM_EMAIL plus SYSTEM_EMAIL_FROM (Cloudflare Email Sending), or a LICENSE_KEY for the managed notify service. You can force a provider with SYSTEM_EMAIL_PROVIDER (auto default, cloudflare, notify, console which works only in development).
Error reporting and address lookup
Section titled “Error reporting and address lookup”ERROR_REPORTING:local(default, logs only) or anhttps://URL that receives error reports.ERROR_SAMPLE_RATE(0 to 1, default 1) samples repeated errors.ADDRESS_LOOKUP_URL: by default address autocomplete uses the public Photon geocoder (OpenStreetMap data, fair use). Point it at your own Photon instance (for examplehttps://photon.example.com/api) or setoffto keep addresses manual only.
Reference
Section titled “Reference”| Name | Type | Worker | Feature |
|---|---|---|---|
CLOUDFLARE_DNS_API_TOKEN |
Secret | core | Domain wizard automation |
EDGE_HOSTNAME |
Variable | core | Target of custom domains (default: host of EDGE_ORIGIN) |
EDGE_SCRIPT_NAME |
Variable | core | Worker for custom domains and routes (default amable-edge) |
CF_ZONE_ID |
Variable | core | CNAME tracking domains |
CF_API_TOKEN |
Secret | core | CNAME tracking domains (SSL and Certificates: Edit) |
TRACKING_CNAME_TARGET |
Variable | core | CNAME target shown to users (default: host of EDGE_ORIGIN) |
META_APP_ID, META_APP_SECRET |
Secret | core | Meta ads |
GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN, GOOGLE_ADS_LOGIN_CUSTOMER_ID |
Secret | core | Google Ads |
TIKTOK_APP_ID, TIKTOK_APP_SECRET |
Secret | core | TikTok ads |
ADS_OAUTH_REDIRECT_URI |
Variable | core | Ads redirect override |
GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET |
Variable / Secret | core | Google Calendar |
TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY |
Variable / Secret | core | Bot protection |
POSTSHIBA_API_KEY, POSTSHIBA_TEAM_ID, POSTSHIBA_CLUSTER_ID |
Secret / Variable / Variable | core | Marketing email (all three required) |
POSTSHIBA_BASE_URL, POSTSHIBA_INJECT_URL, POSTSHIBA_WEBHOOK_SECRET |
Variable / Variable / Secret | core | Marketing email, optional overrides |
SYSTEM_EMAIL (binding), SYSTEM_EMAIL_FROM, SYSTEM_EMAIL_FROM_NAME, SYSTEM_EMAIL_PROVIDER |
Binding / Variables | core | System email |
ERROR_REPORTING, ERROR_SAMPLE_RATE |
Variables | core | Error reports |
ADDRESS_LOOKUP_URL |
Variable | core | Address autocomplete |
Limits and permissions
Section titled “Limits and permissions”- Setting secrets requires access to the Cloudflare account (Wrangler login or dashboard). Nothing on this page can be changed from inside amabledata.
- Connecting ad accounts and tracking domains from the app requires the
analytics:configurepermission (owner, admin and marketer). The domain wizard in Settings › Domains requiresdomains:manage(owner and admin). See Roles and permissions. - Never reuse the Cloud installer token for these features: give each token only the permissions listed for it.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| Create on Cloudflare fails with no Cloudflare zone of this account covers the hostname | The domain is not an active zone of the account, or the token’s Zone Resources exclude it | Add the domain to the account and wait for Active; check the token resources. |
| no Cloudflare API token is configured: create the records manually | CLOUDFLARE_DNS_API_TOKEN missing |
Set the secret, or create the records by hand. |
| Custom tracking domains are not configured on this installation. | CNAME mode credentials missing | Set CF_ZONE_ID and CF_API_TOKEN, or use zone mode. |
| The certificate service did not answer. Try again in a moment. | The custom hostname API call failed | Check the token permission (SSL and Certificates: Edit) and that Cloudflare for SaaS is enabled on the zone. |
| An ad platform or Google shows as unavailable | The app credentials are missing or incomplete | Set every listed secret for that platform. |
| The OAuth provider says the redirect URI does not match | The URI registered on the app differs from <APP_ORIGIN>/oauth/... |
Register the exact URI, including https:// and without a trailing slash. |
| A variable disappeared after an update | It was set in the dashboard or in the generated file, and the deploy replaced it | Put it in deploy/self-host/core.wrangler.jsonc or store it as a secret. |

