# Cloudflare Queues Integrations

Buffer incoming work, send messages to other services and recover failed deliveries with Cloudflare Queues.

## Setup notes

- **Connect your Cloudflare account** Enter your account ID and a Queues API token. Queues Read allows inspection. Sending messages or changing queues requires Queues Write. Analytics queries require Account Analytics Read.
- **Receive messages in FastHook** Configure the relay Worker with your account ID, the FastHook callback and its shared secret. Attach it as the consumer of the queue you want to automate. Use a dedicated queue if another service already consumes the original.
- **Handle messages that exhaust their retries** Choose a dead-letter queue in the source consumer’s retry settings. Attach the relay to that destination, set DEAD\_LETTER\_QUEUE to its exact name and select the dead-letter trigger.

## Workflow templates

- [Review Cloudflare Queue deliveries in Asana](https://www.fasthook.io/templates/cloudflare-queues-deliveries-to-asana.md): Create a review task for each selected queue delivery.
- [Route Cloudflare Queue delivery references to Linear](https://www.fasthook.io/templates/cloudflare-queues-deliveries-to-linear.md): Open a Linear issue when the selected Cloudflare Queue delivers a message.
- [Archive Cloudflare Queue delivery references in OneDrive](https://www.fasthook.io/templates/cloudflare-queues-deliveries-to-onedrive.md): Save a JSON record of the queue, message ID, delivery ID, attempt and timestamp for each delivery.
- [Record recent Cloudflare Queue deliveries in Workers KV](https://www.fasthook.io/templates/cloudflare-queues-deliveries-to-workers-kv.md): Index the delivery metadata for 24 hours using the delivery ID as the key.
- [Log Cloudflare Queue deliveries in Google Sheets](https://www.fasthook.io/templates/cloudflare-queues-deliveries-to-google-sheets.md): Append a row for each message delivered by the configured Cloudflare Queue relay.
- [Record order events from a queue once](https://www.fasthook.io/templates/cloudflare-queues-order-events-to-d1.md): Keep one D1 journal entry per order event, even when the producer sends the event twice.
- [Enqueue a webhook message](https://www.fasthook.io/templates/webhook-to-cloudflare-queues.md): Send the message field from each incoming webhook to the selected Cloudflare queue.
- [Send queue messages to Slack](https://www.fasthook.io/templates/cloudflare-queues-messages-to-slack.md): Post incoming queue messages to the Slack channel where your team follows new work.
- [Create Trello cards for dead letters](https://www.fasthook.io/templates/cloudflare-queues-dead-letters-to-trello.md): Create a triage card when a message reaches your designated dead-letter queue.
- [Archive queue messages in R2](https://www.fasthook.io/templates/cloudflare-queues-archive-to-r2.md): Save each message body as a JSON file in the chosen R2 bucket, with a distinct object key for each queue and message.

## Triggers

2 Instant

- **Message received in a dead-letter queue** (Instant) — Start a workflow when a message reaches the dead-letter queue configured on the relay.
- **Message received in a queue** (Instant) — Start a workflow when the consumer receives a message from the selected queue.

## Actions

- **Acknowledge or retry pulled messages** — Use the lease IDs from an HTTP pull to confirm successful work or return failed messages for another attempt.
- **Analyze consumer performance** — Review how queue consumers handled batches during the selected period.
- **Analyze delayed messages** — Track messages waiting for their delivery delay to expire.
- **Analyze queue backlog over time** — Compare how many messages and bytes were waiting during the selected period.
- **Change an event subscription** — Adjust the event source, destination or enabled state of an existing subscription.
- **Change selected queue settings** — Change individual settings, such as message retention, while preserving the other settings.
- **Check queue purge progress** — Find out whether a request to clear the entire queue has finished.
- **Check the current queue backlog** — Read Cloudflare’s estimate of how many messages and bytes are waiting in the queue.
- **Clear all messages from a queue** — Permanently remove all queued messages. Cloudflare requires explicit confirmation in the request.
- **Connect a queue consumer** — Configure a Worker or an HTTP pull consumer to process messages from this queue.
- **Count queue operations** — Group message operations to understand how producers and consumers used your queues.
- **Create a queue** — Choose a name for a new queue that producers can send messages to.
- **Delete a queue** — Remove the selected queue from the account. Messages still in the queue are lost.
- **Disconnect a queue consumer** — Remove a consumer from the queue so it stops receiving messages.
- **Explore queue analytics columns** — Look up the available columns and data types before writing an analytics query.
- **Extend message leases** — Give an HTTP pull consumer more time to finish processing. Use the replacement lease IDs for subsequent requests.
- **Inspect waiting messages** — Read a sample of queued messages without leasing them. Use the returned references to remove individual messages if needed.
- **List consumers for a queue** — See which services are configured to receive messages from the selected queue.
- **List event subscriptions** — Find the rules that deliver Cloudflare account events to a queue. Filter by destination queue or browse a page at a time.
- **List queues in an account** — Browse the queues in your connected account and use the page controls to retrieve more results.
- **Preview messages with the legacy API** — Read messages through Cloudflare’s older preview interface for compatibility with existing workflows.
- **Pull messages for processing** — Lease a batch of messages for an HTTP consumer. Acknowledge completed messages before their leases expire.
- **Query queue message activity with SQL** — Run a SQL query over queue message events for the connected account.
- **Read an event subscription** — See which events a subscription matches, where it delivers them and whether it is enabled.
- **Read consumer settings** — Look up the delivery and retry settings for one consumer on the selected queue.
- **Read queue details** — Look up the selected queue’s name, settings and configured producers and consumers.
- **Remove an event subscription** — Stop forwarding the events matched by this subscription to its destination queue.
- **Remove messages from a legacy preview** — Use the identifiers from the legacy preview interface to remove the selected messages.
- **Remove selected waiting messages** — Delete only the messages identified by references from an earlier inspection.
- **Replace the queue configuration** — Supply the full configuration you want Cloudflare to apply to this queue.
- **Route Cloudflare events to a queue** — Choose which account events Cloudflare should deliver and which queue should receive them.
- **Sample live queue metrics** — Read the next update from the queue metrics stream, then close the connection.
- **Send a batch of messages** — Submit multiple messages to the same queue in one request.
- **Send a message to a queue** — Send a text or JSON message for a consumer to process. You can delay its first delivery.
- **Set consumer configuration** — Supply the configuration for a consumer, including how it receives and retries messages.
