Portal Community

dns/create

Create a new DNS record in a Cloudflare zone.

Proxied vs. Unproxied: Set Proxied: true for web traffic records (A, AAAA, CNAME) to route through Cloudflare CDN and WAF. Set Proxied: false for MX, SRV, bare IP records, and any record that must not be intercepted by Cloudflare.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
ApiTokenstringrequiredScoped Cloudflare API Token with DNS.Edit permission. Store in BizFirst Credentials Manager.

Operation Fields

FieldTypeRequiredDescription
ZoneIdstringrequired32-character hexadecimal Zone ID.
TypestringrequiredRecord type: A, AAAA, CNAME, MX, TXT, SRV, NS, or CAA.
NamestringrequiredRecord name, e.g., api.example.com or @ for the apex domain.
ContentstringrequiredRecord value: IP address for A/AAAA, hostname for CNAME, text for TXT, mail server for MX.
TtlintegeroptionalTTL in seconds. Use 1 for automatic (Cloudflare default). Other values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200, 86400.
ProxiedbooleanoptionalRoute through Cloudflare proxy. Default: false. Set true for A/AAAA/CNAME records that should use CDN/WAF.
PriorityintegeroptionalPriority for MX and SRV records. Lower values are higher priority.

Sample Configuration

{
  "resource": "dns",
  "operation": "create",
  "connection": {
    "ApiToken": "{{ $credentials.cloudflare_dns_edit }}"
  },
  "ZoneId": "023e105f4ecef8ad9ca31a8372d0c353",
  "Type": "A",
  "Name": "api.example.com",
  "Content": "198.51.100.4",
  "Ttl": 1,
  "Proxied": true
}

Validation Errors

CodeConditionResolution
MISSING_API_TOKENApiToken is emptySet the ApiToken credential with DNS.Edit permission
MISSING_ZONE_IDZoneId is emptyProvide the Zone ID
MISSING_TYPEType field is emptySpecify a valid record type (A, CNAME, MX, TXT, etc.)
MISSING_NAMEName field is emptyProvide the fully-qualified record name or @
MISSING_CONTENTContent field is emptyProvide the record value (IP, hostname, or text)
UNKNOWN_ERRORDuplicate record or invalid content for typeCheck if the record already exists with dns/list

Output

Success Port

FieldTypeDescription
idstringUUID of the newly created record — save for future dns/update and dns/delete calls
typestringRecord type as created
namestringFully-qualified record name
contentstringRecord value
ttlintegerEffective TTL
proxiedbooleanProxy status
createdOnstringISO 8601 creation timestamp

Error Port

On failure, the error port receives an object with code and message.

Sample Output

{
  "id": "372e67954025e0ba6aaa6d586b9e0b59",
  "type": "A",
  "name": "api.example.com",
  "content": "198.51.100.4",
  "ttl": 1,
  "proxied": true,
  "createdOn": "2026-05-26T12:00:00Z"
}

Expression Reference

ExpressionReturns
{{ $node.DnsCreate.output.id }}New record UUID — persist for future operations
{{ $node.DnsCreate.output.name }}Created record name
{{ $node.DnsCreate.output.content }}Created record value
{{ $node.DnsCreate.output.proxied }}Boolean proxy status of new record
{{ $node.DnsCreate.output.createdOn }}Creation timestamp

Node Policies & GuardRails

PolicyDetail
Require DNS.Edit tokenCreation requires write permission — a read-only token will fail with a 403
Store ApiToken in Credentials ManagerNever hardcode the token in configuration JSON
Persist the returned record IDStore the new record's id in a workflow variable — it is needed for future update and delete operations
Do not proxy MX or SRV recordsMX, SRV, and NS records cannot be proxied — set Proxied: false for these types
Validate content format per typeA records require valid IPv4, AAAA requires IPv6, CNAME requires a valid hostname — validate before calling
Check for duplicates firstCloudflare rejects duplicate records — call dns/list to check for existing records with the same name and type before creating

Examples

Example 1: Automated Subdomain Provisioning on Customer Signup

Trigger: new customer record created in the database. Workflow: (1) Generate subdomain name from customer slug. (2) Call dns/create with Type: "CNAME", Name: "{slug}.example.com", Content: "app.example.com", Proxied: true. (3) Store the returned record ID in the customer record for future cleanup.

Example 2: DKIM TXT Record Creation

When onboarding a domain to an email service, call dns/create with Type: "TXT", Name: "selector._domainkey.example.com", and Content: "v=DKIM1; k=rsa; p=...". Set Proxied: false (TXT records cannot be proxied).

Example 3: Post-Server-Provisioning A Record

After a Docker or cloud provisioning workflow creates a new server and retrieves its IP, call dns/create with Type: "A", Name: "node-{id}.example.com", and Content: "{serverIp}". This makes the new node immediately resolvable.