Cache Node

The Cache node deduplicates events and enriches payloads with cached data. Drop duplicate events based on a payload key, or attach previously-seen data to new events passing through the node.

Overview

Webhook sources sometimes send duplicate events — Stripe, for example, may retry a webhook delivery even if the first attempt succeeded. The Cache node addresses this with two capabilities:

  • Deduplication — Tracks event signatures based on a payload field (keyField). If an event with the same key value arrives within the TTL window, it is silently dropped.
  • Enrichment — Attaches previously-cached payload data to new events. The cached data is merged into the enrichTargetField (defaults to _cached).

Configuration

FieldTypeDefaultDescription
namestringFriendly label for the cache node
keyFieldstring(required)Payload field to use as the cache key (dot-notation supported)
ttlSecondsnumber3600Time-to-live for cache entries in seconds
deduplicateEnabledbooleantrueDrop events with the same key already in cache
enrichEnabledbooleanfalseInject cached data from previous events into new events
enrichTargetFieldstring_cachedField name where cached data is injected during enrichment
inputNodes{ nodeType, nodeId }[][]Upstream nodes that feed this one. nodeType is the node kind (webhook, scheduledWorkflow, filter, …)
inputNodes{ nodeType, nodeId }[][]Upstream nodes that feed this one. nodeType is the node kind (webhook, scheduledWorkflow, filter, …)
inputNodesstring[][]Generic node IDs that feed events into this cache
outputWebhookIdsstring[][]Webhook IDs to forward non-deduplicated events to
outputTransformIdsstring[][]Transform node IDs to forward events to
outputNodesstring[][]Generic node IDs to forward events to
filtersPayloadFilter[][]Optional payload filters applied before cache logic
isActivebooleantrueWhether the cache is enabled
The cache key should uniquely identify an event. Common choices include id, data.object.id, or any dot-notation path into the payload. If the key field is missing from the payload, the event passes through unchanged.

Create a Cache Node

bashCreate Cache
curl -X POST /api/cache-nodes \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Stripe Event Dedup",
    "keyField": "id",
    "ttlSeconds": 3600,
    "deduplicateEnabled": true,
    "isActive": true
  }'

Response

json201 Created
{
  "_id": "6656a3b4c5d6e7f8a9b0c1d2",
  "name": "Stripe Event Dedup",
  "keyField": "id",
  "ttlSeconds": 3600,
  "deduplicateEnabled": true,
  "enrichEnabled": false,
  "enrichTargetField": "_cached",
  "inputNodes": [],
  "inputNodes": [],
  "inputNodes": [],
  "outputWebhookIds": [],
  "outputTransformIds": [],
  "outputNodes": [],
  "filters": [],
  "isActive": true,
  "createdAt": "2025-05-01T12:00:00.000Z",
  "updatedAt": "2025-05-01T12:00:00.000Z"
}

Update a Cache Node

bashUpdate Cache
curl -X PATCH /api/cache-nodes/6656a3b4c5d6e7f8a9b0c1d2 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "ttlSeconds": 7200,
    "enrichEnabled": true
  }'

Canvas Integration

The Cache node is available as a canvas node. Connect webhooks or scheduled webhooks as inputs, and webhooks or transforms as outputs. Events flow through the cache, which applies deduplication and/or enrichment before forwarding to output nodes.


Payload Examples

First occurrence — passes through

jsonFirst event
{
  "id": "evt_stripe_abc123",
  "type": "payment_intent.succeeded",
  "data": {
    "object": { "amount": 5000, "currency": "usd" }
  }
}
// Cache key: "evt_stripe_abc123" — NOT in cache
// Result: PASSES through, key stored with TTL

Duplicate — deduplicated

jsonDuplicate event
{
  "id": "evt_stripe_abc123",
  "type": "payment_intent.succeeded",
  "data": {
    "object": { "amount": 5000, "currency": "usd" }
  }
}
// Cache key: "evt_stripe_abc123" — FOUND in cache (within TTL)
// deduplicateEnabled: true
// Result: DROPPED — duplicate event discarded

Enrichment — cached data attached

jsonEnriched event
{
  "id": "evt_stripe_def456",
  "type": "payment_intent.succeeded",
  "data": { "amount": 3000 },
  "_cached": {
    "id": "evt_stripe_def456",
    "type": "payment_intent.created",
    "data": { "amount": 3000, "status": "requires_payment_method" }
  }
}
// enrichEnabled: true, enrichTargetField: "_cached"
// Previous event with same key is attached under _cached

Use Cases

  • Webhook deduplication — Stripe sends the same webhook 2-3 times as retries. The cache detects the duplicate key and silently drops repeated deliveries so each event is processed only once.
  • Idempotency enforcement — Guarantee that duplicate webhook calls do not cause duplicate side effects in your system.
  • Payload enrichment — The first event carries user info, the second event carries order info. The cache enriches the second event with the user data from the first, so downstream nodes receive a complete picture without additional API calls.
  • Burst protection — During high-volume periods, deduplicate rapid-fire events that carry the same payload.
  • Testing and replay — When replaying events for testing, the cache prevents downstream services from being hit with previously-processed events.

API Reference

MethodWebhookDescription
GET/api/cache-nodesList all cache nodes
POST/api/cache-nodesCreate a new cache node
GET/api/cache-nodes/:idGet a specific cache node
PATCH/api/cache-nodes/:idUpdate a cache node
DELETE/api/cache-nodes/:idDelete a cache node