Paragon · Arazzo Workflow

Paragon Find and Manage a Trigger Subscription

Version 1.0.0

Look up a Connected User's subscriptions and branch to update or unsubscribe.

1 workflow 1 source API 1 provider
View Spec View on GitHub Embedded IntegrationsIntegration InfrastructureiPaaSAI AgentsMCPIntegrationsArazzoWorkflows

Provider

paragon

Workflows

find-and-manage-subscription
Resolve a subscription, then branch to update its parameters or unsubscribe.
Lists the Connected User's trigger subscriptions and, when at least one exists, branches on the requested action to either update the subscription parameters or delete the subscription.
3 steps inputs: action, deliveryUrl, projectId, subscriptionId, trigger, triggerParameters outputs: deletedSubscriptionId, updatedSubscriptionId
1
listSubscribedTriggers
listSubscribedTriggers
Retrieve the list of existing trigger subscriptions for the Connected User to confirm there is something to manage.
2
updateTriggerSubscription
updateTriggerSubscription
Patch the parameters of the target trigger subscription for the Connected User.
3
unsubscribeFromTrigger
unsubscribeFromTrigger
Remove the target trigger subscription so Paragon stops delivering its events to the Connected User.

Source API Descriptions

Arazzo Workflow Specification

paragon-manage-trigger-subscription-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Paragon Find and Manage a Trigger Subscription
  summary: Look up a Connected User's subscriptions and branch to update or unsubscribe.
  description: >-
    A subscription lifecycle flow. The workflow lists the Connected User's
    current trigger subscriptions, branches on whether any subscriptions exist,
    and then either patches the target subscription's parameters or removes it
    entirely. 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: triggersApi
  url: ../openapi/paragon-triggers-api-openapi.yml
  type: openapi
workflows:
- workflowId: find-and-manage-subscription
  summary: Resolve a subscription, then branch to update its parameters or unsubscribe.
  description: >-
    Lists the Connected User's trigger subscriptions and, when at least one
    exists, branches on the requested action to either update the subscription
    parameters or delete the subscription.
  inputs:
    type: object
    required:
    - projectId
    - subscriptionId
    - action
    properties:
      projectId:
        type: string
        description: Your Paragon Project ID.
      subscriptionId:
        type: string
        description: The subscription ID to update or remove.
      action:
        type: string
        description: Either "update" to patch parameters or "unsubscribe" to delete.
      trigger:
        type: string
        description: The trigger name, required when updating the subscription.
      triggerParameters:
        type: object
        description: New trigger-specific parameters, used when updating.
      deliveryUrl:
        type: string
        description: Optional webhook URL override, used when updating.
  steps:
  - stepId: listSubscribedTriggers
    description: >-
      Retrieve the list of existing trigger subscriptions for the Connected
      User to confirm there is something to manage.
    operationId: listSubscribedTriggers
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subscriptions: $response.body
    onSuccess:
    - name: hasSubscriptionsUpdate
      type: goto
      stepId: updateTriggerSubscription
      criteria:
      - context: $response.body
        condition: $.length > 0 && '$inputs.action' == 'update'
        type: jsonpath
    - name: hasSubscriptionsUnsubscribe
      type: goto
      stepId: unsubscribeFromTrigger
      criteria:
      - context: $response.body
        condition: $.length > 0 && '$inputs.action' == 'unsubscribe'
        type: jsonpath
  - stepId: updateTriggerSubscription
    description: >-
      Patch the parameters of the target trigger subscription for the Connected
      User.
    operationId: updateTriggerSubscription
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    requestBody:
      contentType: application/json
      payload:
        trigger: $inputs.trigger
        parameters: $inputs.triggerParameters
        deliveryUrl: $inputs.deliveryUrl
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subscriptionId: $response.body#/id
      updatedTrigger: $response.body#/trigger
    onSuccess:
    - name: done
      type: end
  - stepId: unsubscribeFromTrigger
    description: >-
      Remove the target trigger subscription so Paragon stops delivering its
      events to the Connected User.
    operationId: unsubscribeFromTrigger
    parameters:
    - name: projectId
      in: path
      value: $inputs.projectId
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedSubscriptionId: $inputs.subscriptionId
  outputs:
    updatedSubscriptionId: $steps.updateTriggerSubscription.outputs.subscriptionId
    deletedSubscriptionId: $steps.unsubscribeFromTrigger.outputs.deletedSubscriptionId