Skip to Content
Nodesweb_hook

web_hook

web_hook nodes handle inbound POST calls from external systems.

Summary

  • Placement: Entry only (webhook calls start the flow).
  • Context: Backend apps.
  • Visual: No.
  • Level: Intermediate (requires integration setup).
  • Purpose: Accept external events and route them into campaign logic.
Web hook node
  • Support secret headers, HMAC signatures, and IP allowlists to secure integrations.
  • Map JSON payloads into $state fields or pass-through attachments for downstream use.
  • Provide explicit success/error responses so partners know when the automation accepts an event.

Example: update user variables

POST /api/hooks/campaign/{campaignId} HTTP/1.1 Authorization: Bearer {{ token }} Content-Type: application/json { "event": "user.update", "userId": "usr_9834", "variables": { "bonus": 50, "xp_delta": { "op": "increment", "value": 120 } } }
  • userId identifies the player whose state will be updated.
  • bonus sets the absolute value for a user variable configured via the global variables_pool.
  • xp_delta shows how to express a relative change; in this example the user gains 120 XP by incrementing the existing value.

Example: send arbitrary user events

POST /api/hooks/campaign/{campaignId} HTTP/1.1 Authorization: Bearer {{ token }} Content-Type: application/json { "event": "user.events", "events": [ { "userId": "123456", "amount": 1299, "transactionId": "tx_001" } ] }

Example ResultFly response:

HTTP/1.1 200 OK Content-Type: application/json Signature: sha256=3cb32e… { "status": "accepted", "node": "node-web-hook-demo", "traceId": "hook_01J8XCG9YNX6", "next": "node-branch-loyalty" }
Last updated on