Mailchimp · Arazzo Workflow

Mailchimp Find and Start an Automation

Version 1.0.0

List classic automations, pick the first, and start all its emails.

1 workflow 1 source API 1 provider
View Spec View on GitHub CampaignsEmail MarketingMarketing AutomationNewslettersTransactional EmailArazzoWorkflows

Provider

mailchimp

Workflows

find-and-start-automation
Find the first automation and start all its emails.
Lists automations and starts all emails in the first one found; ends if there are none.
2 steps inputs: count outputs: startedWorkflowId
1
listAutomations
getAutomations
List the classic automation workflows on the account.
2
startEmails
postAutomationsIdActionsStartAllEmails
Start all emails in the first automation found. Returns a 204 empty response on success.

Source API Descriptions

Arazzo Workflow Specification

mailchimp-find-and-start-automation-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Mailchimp Find and Start an Automation
  summary: List classic automations, pick the first, and start all its emails.
  description: >-
    A find-then-act flow for classic automation workflows. The workflow lists
    the account's automations and branches on whether any exist: when at least
    one automation is found it starts all emails in the first automation, and
    when none exist it ends without acting. The automation (workflow) id from
    the list step is passed straight into the start action. Authentication uses
    HTTP Basic auth with any username and your Mailchimp API key as the
    password.
  version: 1.0.0
sourceDescriptions:
- name: mailchimpMarketingApi
  url: ../openapi/mailchimp-marketing-api-openapi.yml
  type: openapi
workflows:
- workflowId: find-and-start-automation
  summary: Find the first automation and start all its emails.
  description: >-
    Lists automations and starts all emails in the first one found; ends if
    there are none.
  inputs:
    type: object
    properties:
      count:
        type: integer
        description: Number of automations to request when listing.
        default: 10
  steps:
  - stepId: listAutomations
    description: List the classic automation workflows on the account.
    operationId: getAutomations
    parameters:
    - name: count
      in: query
      value: $inputs.count
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstWorkflowId: $response.body#/automations/0/id
    onSuccess:
    - name: automationFound
      type: goto
      stepId: startEmails
      criteria:
      - context: $response.body
        condition: $.automations.length > 0
        type: jsonpath
    - name: noAutomations
      type: end
      criteria:
      - context: $response.body
        condition: $.automations.length == 0
        type: jsonpath
  - stepId: startEmails
    description: >-
      Start all emails in the first automation found. Returns a 204 empty
      response on success.
    operationId: postAutomationsIdActionsStartAllEmails
    parameters:
    - name: workflow_id
      in: path
      value: $steps.listAutomations.outputs.firstWorkflowId
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    startedWorkflowId: $steps.listAutomations.outputs.firstWorkflowId