ActiveCampaign · Arazzo Workflow

ActiveCampaign Subscribe Contact to a List Resolved by Name

Version 1.0.0

Resolve a list by name then subscribe an existing contact to it.

1 workflow 1 source API 1 provider
View Spec View on GitHub Marketing AutomationEmail MarketingCRMSales AutomationCustomer ExperienceArazzoWorkflows

Provider

activecampaign

Workflows

subscribe-contact-to-list-by-name
Resolve a list by name and subscribe a contact to it.
Searches lists by name and subscribes the supplied contact to the first matched list.
2 steps inputs: apiToken, contactId, listName outputs: listId
1
findList
retrieve-all-lists
Search lists by the supplied name.
2
subscribeContact
update-list-status-for-contact
Subscribe the supplied contact to the matched list.

Source API Descriptions

Arazzo Workflow Specification

activecampaign-subscribe-contact-to-list-by-name-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: ActiveCampaign Subscribe Contact to a List Resolved by Name
  summary: Resolve a list by name then subscribe an existing contact to it.
  description: >-
    A find-then-act subscription flow. The workflow searches lists by name,
    confirms a match was returned, and subscribes the supplied contact to the
    matched list by activating its list status. Every step spells out its
    request inline, including the Api-Token authentication header, so the flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: activecampaignApi
  url: ../openapi/activecampaign-v3.json
  type: openapi
workflows:
- workflowId: subscribe-contact-to-list-by-name
  summary: Resolve a list by name and subscribe a contact to it.
  description: >-
    Searches lists by name and subscribes the supplied contact to the first
    matched list.
  inputs:
    type: object
    required:
    - apiToken
    - listName
    - contactId
    properties:
      apiToken:
        type: string
        description: ActiveCampaign API token sent in the Api-Token header.
      listName:
        type: string
        description: Name used to resolve the target list.
      contactId:
        type: integer
        description: Identifier of the contact to subscribe.
  steps:
  - stepId: findList
    description: Search lists by the supplied name.
    operationId: retrieve-all-lists
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    - name: filters[name]
      in: query
      value: $inputs.listName
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.lists.length > 0
      type: jsonpath
    outputs:
      listId: $response.body#/lists/0/id
  - stepId: subscribeContact
    description: Subscribe the supplied contact to the matched list.
    operationId: update-list-status-for-contact
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        contactList:
          list: $steps.findList.outputs.listId
          contact: $inputs.contactId
          status: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactListId: $response.body#/contacts/0/id
  outputs:
    listId: $steps.findList.outputs.listId