Wufoo · Arazzo Workflow

Wufoo Rotate a Form Webhook

Version 1.0.0

Add a fresh webhook subscription, then delete the prior one by hash.

1 workflow 1 source API 1 provider
View Spec View on GitHub FormsForm BuilderSurveysData CollectionWebhooksPaymentsSurveyMonkeyArazzoWorkflows

Provider

wufoo

Workflows

rotate-form-webhook
Replace a Wufoo form webhook by creating the new one before deleting the old.
Adds a new webhook subscription pointing at the replacement URL, then deletes the old webhook identified by its hash, leaving exactly one active subscriber.
2 steps inputs: apiKey, formIdentifier, handshakeKey, newUrl, oldHash outputs: deleteResult, newHash
1
addNewWebhook
putFormWebhook
Create the replacement webhook subscription first so a subscriber stays live.
2
deleteOldWebhook
deleteFormWebhook
Delete the previous webhook now that the replacement is registered.

Source API Descriptions

Arazzo Workflow Specification

wufoo-rotate-form-webhook-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Wufoo Rotate a Form Webhook
  summary: Add a fresh webhook subscription, then delete the prior one by hash.
  description: >-
    Rotates a form's webhook subscriber endpoint without dropping events. The
    workflow first adds the new subscription so the replacement endpoint is
    live, then deletes the previously registered webhook by its hash. Ordering
    the create before the delete keeps a subscriber active throughout the swap.
    Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: wufooApi
  url: ../openapi/wufoo-rest-v3-openapi.yml
  type: openapi
workflows:
- workflowId: rotate-form-webhook
  summary: Replace a Wufoo form webhook by creating the new one before deleting the old.
  description: >-
    Adds a new webhook subscription pointing at the replacement URL, then
    deletes the old webhook identified by its hash, leaving exactly one active
    subscriber.
  inputs:
    type: object
    required:
    - apiKey
    - formIdentifier
    - newUrl
    - oldHash
    properties:
      apiKey:
        type: string
        description: Wufoo account API key, used as the HTTP Basic Auth username.
      formIdentifier:
        type: string
        description: Form hash (preferred) or title that owns the webhook.
      newUrl:
        type: string
        description: Replacement subscriber endpoint to POST submissions to.
      handshakeKey:
        type: string
        description: Shared secret echoed back as HandshakeKey in payloads.
      oldHash:
        type: string
        description: Hash of the existing webhook to remove after the new one is live.
  steps:
  - stepId: addNewWebhook
    description: Create the replacement webhook subscription first so a subscriber stays live.
    operationId: putFormWebhook
    parameters:
    - name: identifier
      in: path
      value: $inputs.formIdentifier
    - name: format
      in: path
      value: json
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        url: $inputs.newUrl
        handshakeKey: $inputs.handshakeKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      newHash: $response.body#/WebHookPutResult/Hash
  - stepId: deleteOldWebhook
    description: Delete the previous webhook now that the replacement is registered.
    operationId: deleteFormWebhook
    parameters:
    - name: identifier
      in: path
      value: $inputs.formIdentifier
    - name: hash
      in: path
      value: $inputs.oldHash
    - name: format
      in: path
      value: json
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deleteResult: $response.body#/WebHookDeleteResult
  outputs:
    newHash: $steps.addNewWebhook.outputs.newHash
    deleteResult: $steps.deleteOldWebhook.outputs.deleteResult