Webhook handoff

Validate a runx execution context and deliver a governed payload once to an n8n Cloud workflow webhook or a Zapier Catch Hook, with exact approval and the receiver's acknowledgement receipted.

You’re reading version 0.1.3. Go to the current version

Overview

Hand off governed runx work to a workflow platform without turning it into the authority holder.

This skill is the outbound side of a workflow integration. runx owns the policy decision, execution context, and receipt. The receiving platform owns its webhook, canvas, branching, fan-out, and downstream notifications. platform chooses the receiver and the connector that delivers to it: n8n for an n8n Cloud workflow, zapier for a Zapier Catch Hook.

In the manual

Runners

  • preflight
  • send

Declared by its execution profile. Read the profile

SKILL.md

Webhook Handoff

Hand off governed runx work to a workflow platform without turning it into the authority holder.

This skill is the outbound side of a workflow integration. runx owns the policy decision, execution context, and receipt. The receiving platform owns its webhook, canvas, branching, fan-out, and downstream notifications. platform chooses the receiver and the connector that delivers to it: n8n for an n8n Cloud workflow, zapier for a Zapier Catch Hook.

Runners

  • preflight: validates and normalizes the handoff context without network.
  • send: validates the context and delivers it to the chosen receiver.

Use preflight for reviews, CI, and local harnesses; it never needs approval. The send runner first calls native control.prepare_handoff, which validates the execution identity and produces the canonical delivery envelope. It then runs handoff.deliver on the chosen connector, which posts that envelope after exact approval: for n8n to https://<workspace>.app.n8n.cloud/webhook/<slug>, for Zapier to the Catch Hook. Neither platform offers a way to read a delivery back, so the receipt records the receiver's answer with finality acknowledged, not a confirmed readback.

Execution context

execution_context must identify where the handoff came from. Include at least one of:

  • caller or caller_id
  • principal or principal_id
  • workflow or workflow_id
  • upstream_run_id

When present, these fields must match the top-level inputs:

  • platform
  • event_id
  • idempotency_key (bound to event_id)
  • handoff_scope
  • handoff_audience

The receiver gets the normalized delivery object, not an independently reassembled copy of these fields. That object carries the business payload, source context, exact handoff scope and audience, and idempotency binding the receiver must validate before starting its workflow.

Edge cases

  • Only n8n Cloud hosts are reachable for n8n. A self-hosted instance needs its own connector that declares its host.
  • Anyone who knows the webhook path can post to it, so have the receiving workflow check handoff_scope and handoff_audience before acting.
  • Do not put raw provider credentials into payload or execution_context. Pass credential references or let runx hold the provider secret.
  • If an n8n workflow slug changes, update handoff_audience to the matching n8n:workflow:<slug> value.
  • The receiver must dedupe by event_id before branching or sending downstream notifications.

Inputs

  • platform (required): n8n or zapier.
  • event_id (required): stable id for receiver-side dedupe.
  • execution_context (required): explicit caller/workflow context.
  • payload (required): business payload delivered to the receiver.
  • handoff_audience (optional): defaults to n8n:workflow:runx-governed-effect or zapier:zap:runx-governed-effect.
  • webhook_host (send runner, n8n only): the n8n Cloud host, such as acme.app.n8n.cloud. A Zapier handoff refuses one.

The webhook URL is the chosen connector's credential: n8n's webhook, bound with runx connector use n8n --credential webhook, which must be on webhook_host; Zapier's catch_hook, bound with runx connector use zapier --credential catch_hook. Either URL goes on stdin and never enters the run's inputs, records or receipts.

event_id is also the Runx mutation idempotency key and the value delivered as idempotency_key; there is no second retry identity that can drift from it.

Published execution profile

The execution profile published with 0.1.3, shown as its exact bytes.

Runners
  • preflight
  • send
Profile digestsha256:2b6172dd31ad623cb2ac8dea07312ae2abcccd30644eee228bb0de20b7719cde
skill: webhook-handoff
version: "0.1.3"
catalog:
  kind: graph
  audience: operator
  visibility: public
  role: context
  execution: execute
  completion: provider_acknowledgement
  approval: required
  category: ops
input_definitions:
  platform:
    type: string
    required: true
    description: The workflow platform that receives the handoff, and the connector that delivers it.
    schema: { enum: [n8n, zapier] }
  event_id:
    type: string
    required: true
    description: Stable event id the receiver dedupes by, and Runx's mutation idempotency key.
    schema: { pattern: '^[A-Za-z0-9._:-]{3,200}$' }
  handoff_audience:
    type: string
    required: false
    description: Exact receiver audience, n8n:workflow:<slug> or zapier:zap:<name>; defaults to the platform's runx-governed-effect receiver.
    schema: { pattern: '^(n8n:workflow|zapier:zap):[^\s{}]+$' }
  execution_context:
    type: json
    packet: runx.orchestrator.execution_context.v1
    required: true
    description: Caller, principal, workflow, or upstream-run context for the handoff.
  payload:
    type: json
    required: true
    description: Non-empty business payload delivered intact inside the canonical envelope.
  source:
    type: string
    required: false
    default: runx
    description: Human-readable source label.
    schema: { minLength: 1, maxLength: 256 }
  receiver:
    type: json
    required: false
    description: Optional receiver metadata; a supplied url must be public HTTPS.
  webhook_host:
    type: string
    required: false
    description: For n8n, the workspace's n8n Cloud host, such as acme.app.n8n.cloud, without scheme or path. Zapier takes none.
    schema: { pattern: '^[a-z0-9][a-z0-9-]{0,62}\.app\.n8n\.cloud$' }
harness:
  files: [fixtures/support/composed.graph]
  cases:
    - name: webhook-handoff-preflight-ready-n8n
      operator_journeys:
        - mode: standalone
          request: Hand this governed Runx payload to the configured n8n workflow.
          expected_outcome: Validate context, bind scoped auth and idempotency, and return the exact provider-neutral webhook handoff contract.
        - mode: composed
          request: Continue this completed Runx operation into the selected n8n workflow.
          expected_outcome: Reuse the supplied run context and payload without rebuilding upstream results or duplicating webhook delivery.
          prior_evidence:
            - The validated Runx execution context, payload, workflow target, and idempotency key supplied in the fixture.
          must_not_repeat:
            - Do not rerun the upstream Runx operation.
            - Do not deliver the webhook again after stable receipt evidence exists.
      runner: preflight
      inputs:
        platform: n8n
        event_id: evt_n8n_demo_001
        execution_context:
          caller: runx-cli
          workflow: n8n-cloud-demo
          environment: local-dogfood
        payload:
          hello: workflow
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
          state: sealed
          outcome: completed
        steps:
          - terms
          - build-handoff-context
        step_outputs:
          build-handoff-context:
            subset:
              handoff_context:
                data:
                  platform: n8n
                  event_id: evt_n8n_demo_001
                  status: ready
                  idempotency:
                    key: evt_n8n_demo_001
                    receiver_should_dedupe: true
                  receiver_validation:
                    require_scope: orchestrator.n8n.workflow.invoke
                    require_audience: n8n:workflow:runx-governed-effect
                  receipt_expectations:
                    outbound_effect_must_be_receipted: true
                    receiver_response_must_be_captured: true
    - name: webhook-handoff-preflight-ready-zapier
      operator_journeys:
        - mode: standalone
          request: Hand this governed Runx payload to the configured Zapier Catch Hook.
          expected_outcome: Validate context, scoped auth, idempotency, and receipt expectations for the exact webhook handoff.
      runner: preflight
      inputs:
        platform: zapier
        event_id: evt_zapier_demo_001
        handoff_audience: zapier:zap:runx-governed-effect
        execution_context:
          caller: runx-cli
          workflow: operator-zap-demo
        payload:
          hello: zap
      expect:
        status: sealed
        steps:
          - terms
          - build-handoff-context
        step_outputs:
          build-handoff-context:
            subset:
              handoff_context:
                data:
                  platform: zapier
                  event_id: evt_zapier_demo_001
                  status: ready
                  receiver_validation:
                    require_scope: orchestrator.zapier.workflow.invoke
                    require_audience: zapier:zap:runx-governed-effect
connectors:
  webhook:
    connector_from: $input.platform
    allowed_connectors: [n8n, zapier]
    operations: [handoff.deliver]
runners:
  preflight:
    description: Validate and normalize a handoff's context with no network call and no approval.
    default: false
    inputs:
      platform:
        definition: platform
      event_id:
        definition: event_id
      handoff_audience:
        definition: handoff_audience
      execution_context:
        definition: execution_context
      payload:
        definition: payload
      source:
        definition: source
      receiver:
        definition: receiver
    examples:
      - platform: n8n
        event_id: evt_n8n_demo_001
        execution_context: { caller: runx-cli, workflow: n8n-cloud-demo }
        payload: { hello: workflow }
    result_from: [build-handoff-context]
    steps:
      - id: terms
        inputs:
          platform: $input.platform
          handoff_audience: $input.handoff_audience
        tool: { module: webhook-handoff.mjs, export: handoffTerms }
        outputs:
          handoff_terms: object
      - id: build-handoff-context
        tool: control.prepare_handoff
        inputs:
          platform: $input.platform
          event_id: $input.event_id
          handoff_scope: $steps.terms.handoff_terms.handoff_scope
          handoff_audience: $steps.terms.handoff_terms.handoff_audience
          execution_context: $input.execution_context
          payload: $input.payload
          source: $input.source
          receiver: $input.receiver
  send:
    description: Deliver a validated payload once to an n8n or Zapier webhook, after exact approval, recording the receiver's acknowledgement.
    default: true
    inputs:
      platform:
        definition: platform
      webhook_host:
        definition: webhook_host
      event_id:
        definition: event_id
      handoff_audience:
        definition: handoff_audience
      execution_context:
        definition: execution_context
      payload:
        definition: payload
      source:
        definition: source
      receiver:
        definition: receiver
    examples:
      - platform: n8n
        webhook_host: acme.app.n8n.cloud
        event_id: evt_n8n_demo_001
        execution_context: { caller: runx-cli, workflow: n8n-cloud-demo }
        payload: { hello: workflow }
      - platform: zapier
        event_id: evt_zapier_demo_001
        execution_context: { caller: runx-cli, workflow: operator-zap-demo }
        payload: { hello: zap }
    result_from: [deliver]
    steps:
      - id: terms
        inputs:
          platform: $input.platform
          handoff_audience: $input.handoff_audience
        tool: { module: webhook-handoff.mjs, export: handoffTerms }
        outputs:
          handoff_terms: object
      - id: build-handoff-context
        tool: control.prepare_handoff
        inputs:
          platform: $input.platform
          event_id: $input.event_id
          handoff_scope: $steps.terms.handoff_terms.handoff_scope
          handoff_audience: $steps.terms.handoff_terms.handoff_audience
          execution_context: $input.execution_context
          payload: $input.payload
          source: $input.source
          receiver: $input.receiver
      - id: address
        inputs:
          platform: $input.platform
          webhook_host: $input.webhook_host
          delivery: $steps.build-handoff-context.handoff_context.delivery
        tool: { module: webhook-handoff.mjs, export: deliveryRequest }
        outputs:
          delivery_request: object

      - id: deliver
        operation: webhook/handoff.deliver
        idempotency_key: $input.event_id
        approval:
          reason: Approve delivering this exact handoff to the workflow's webhook.
          type: workflow_handoff
        result_fields: [acknowledgement]
        input: $steps.address.delivery_request

Published package and test evidence.

This exact version passed its recorded harness run: 7 checks passed · 0 failed.

Test result

Harness resultPassed
Tested version0.1.3
Recorded result7 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Declared cases2
Test recordOpen the recorded run
Inspect receipt referencessha256:77d4307e849acf5a3183f50f428abbace583f07d28bff28f1502cd7bb09583c6sha256:ba13c8ea51bfba6f867b10344f5ffb8400081a2c3ea837ffff0dd5a28c2e1f65sha256:a4a7c82243c85577f5f1840dffc02c12e1291c94ec28a85c634b378ede304364sha256:0c4825bfd7b317ccd2b3d99cb19d714382addd73e8f7380fb25665317d9cf3f8sha256:01409d217cd91c68c05a340d044e74146247c1e0ee8b35d8bfae4cd337f562a6sha256:4741b333ec0988ee5a9af3948b05f18f6ffb3a89518058868a6b16f62163615asha256:b6533a88db00779413bbeacb4df5d2879912d49a89f8b1076cb05e36f2ce46ab

Package identity

Published revision0.1.3
Content digestsha256:589d91318dd7fcb13ed341bf5f1db59a5a4e0ed7764407ba70a77e81e20322b4
SKILL.md digestsha256:3fceea0e887a81b39164bb3bc7f884772b83cda8ccbed0bd2d3ecb343857a315
Execution profile digestsha256:2b6172dd31ad623cb2ac8dea07312ae2abcccd30644eee228bb0de20b7719cde
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 25 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.3ViewingContent digest sha256:589d91318dd7fcb13ed341bf5f1db59a5a4e0ed7764407ba70a77e81e20322b4
  2. sha-3a2e445a8a80Content digest sha256:3a2e445a8a805a3a877e7f2a3ec33eb04db649299c0fd13b2d37fb853782f639
  3. sha-2219191bbdceContent digest sha256:420f97373e5377cfcc016a22abc503b46de3eaf12c29d280473c15bdc8d3db8b