Cross-Provider Workflow

Square Customer to Mailchimp Subscribe

Version 1.0.0

Create a Square customer with Block, then subscribe in Mailchimp.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

block mailchimp

Workflows

square-customer-subscribe
Create a Square customer, then add them to a Mailchimp audience.
Creates a customer in Block's Square Customers API and uses the returned email to add the buyer to a Mailchimp list as a subscriber.
2 steps inputs: emailAddress, familyName, givenName, listId outputs: customerId, memberId, memberStatus
1
create-customer
$sourceDescriptions.blockApi.create-customer
Create a customer profile in Block's Square Customers API.
2
subscribe-member
$sourceDescriptions.mailchimpApi.postListsIdMembers
Add the Square customer to a Mailchimp audience as a subscriber.

Source API Descriptions

Arazzo Workflow Specification

pay-block-new-customer-to-mailchimp-subscribe-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Square Customer to Mailchimp Subscribe
  summary: Create a Square customer with Block, then subscribe in Mailchimp.
  description: >-
    A cross-provider onboarding workflow that creates a customer profile in Block's
    Square Customers API and then adds that buyer to a Mailchimp marketing audience.
    Turns point-of-sale buyer data into an addressable email marketing list.
  version: 1.0.0
sourceDescriptions:
  - name: blockApi
    url: https://raw.githubusercontent.com/api-evangelist/block/refs/heads/main/openapi/block-square-api-openapi.yaml
    type: openapi
  - name: mailchimpApi
    url: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-marketing-api-openapi.yml
    type: openapi
workflows:
  - workflowId: square-customer-subscribe
    summary: Create a Square customer, then add them to a Mailchimp audience.
    description: >-
      Creates a customer in Block's Square Customers API and uses the returned email
      to add the buyer to a Mailchimp list as a subscriber.
    inputs:
      type: object
      properties:
        givenName:
          type: string
        familyName:
          type: string
        emailAddress:
          type: string
        listId:
          type: string
    steps:
      - stepId: create-customer
        description: Create a customer profile in Block's Square Customers API.
        operationId: $sourceDescriptions.blockApi.create-customer
        requestBody:
          contentType: application/json
          payload:
            given_name: $inputs.givenName
            family_name: $inputs.familyName
            email_address: $inputs.emailAddress
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          customerId: $response.body#/customer/id
          customerEmail: $response.body#/customer/email_address
      - stepId: subscribe-member
        description: Add the Square customer to a Mailchimp audience as a subscriber.
        operationId: $sourceDescriptions.mailchimpApi.postListsIdMembers
        requestBody:
          contentType: application/json
          payload:
            email_address: $steps.create-customer.outputs.customerEmail
            status: subscribed
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          memberId: $response.body#/id
          memberStatus: $response.body#/status
    outputs:
      customerId: $steps.create-customer.outputs.customerId
      memberId: $steps.subscribe-member.outputs.memberId
      memberStatus: $steps.subscribe-member.outputs.memberStatus