Cloudflare DNS logo
Amazon SQS logo

Workflow template

Queue mail DNS changes for downstream consumers

Deliver an observed DNS change as one JSON message so a worker can process it asynchronously and retry independently.

How it works

Queue mail DNS changes for downstream consumers

1 Trigger · 1 Action
Cloudflare DNS1 · Trigger

Mail routing or authentication changed

Start when the observed MX, SPF or DMARC records differ from the previous check. The first check saves a baseline.

Amazon SQS2 · Action

Enqueue the DNS change

Delivers a message to the specified queue. A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed. For more information, see the W3C specification for characters. #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF If a message contains characters outside the allowed set, Amazon SQS rejects the message and returns an InvalidMessageContents error. Ensure that your message body includes only valid characters to avoid this exception.

Before activation

Set up your workflow

  1. Choose a standard queue

    Connect Amazon SQS with permission to send messages to the selected standard queue. Paste or select its queue URL.

  2. Watch a mail domain

    Select the zone and domain in the Cloudflare trigger. Allow the first poll to finish before changing an MX, SPF or DMARC record.

  3. Validate the consumer contract

    Read a test message and parse its body as JSON. It contains change_id, domain, observed_at, previous and current. Have consumers deduplicate on change_id because standard queues may redeliver.

Explore connected apps