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 sha-2219191bbdce. 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, workflow_id, workflow_ref, or source_workflow
  • upstream_execution_id or 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 sha-2219191bbdce, shown as its exact bytes.

Runners
  • preflight
  • send
Profile digestsha256:5e771ba53fe667a5af020068658774527cb9362af2b27cc72bbfe29aec21c144
skill: webhook-handoff
version: "0.1.0"
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_ref: n8n-cloud-demo
          environment: local-dogfood
        payload:
          hello: workflow
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
          state: sealed
          disposition: closed
        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_ref: 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:
    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_ref: 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:
    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_ref: n8n-cloud-demo }
        payload: { hello: workflow }
      - platform: zapier
        event_id: evt_zapier_demo_001
        execution_context: { caller: runx-cli, workflow_ref: 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.

The latest recorded test covers an earlier version, 0.1.3. It does not establish a result for this version.

Test result

Harness resultAn earlier version was tested
Tested version0.1.3Not this page’s version, sha-2219191bbdce
Recorded result7 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Declared cases2

Package identity

Published revisionsha-2219191bbdce
Content digestsha256:420f97373e5377cfcc016a22abc503b46de3eaf12c29d280473c15bdc8d3db8b
SKILL.md digestsha256:a5d93e7e96cada970167cc8b0a3d902314b775515bb41ebabf00e87fde7e23dd
Execution profile digestsha256:5e771ba53fe667a5af020068658774527cb9362af2b27cc72bbfe29aec21c144
Publisher identityVerified publisher · runx
Trust tierVerified publisherRunx has verified this publisher. This tier is not a code assessment.
Attestations
  • Publisher · Verifiedrunx · 16 Oct 2026
Source provenanceNot published with this version

Version history

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