Cross-Provider Workflow

Salesforce Lead to Mailchimp Subscribe and Tag

Version 1.0.0

Create a Salesforce lead, subscribe to Mailchimp, then tag the member.

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

Providers Orchestrated

salesforce mailchimp

Workflows

salesforce-lead-to-mailchimp-tag
Create a Salesforce lead, subscribe to Mailchimp, then tag.
Inserts a Lead in Salesforce, subscribes the lead email to a Mailchimp audience, then adds a segmentation tag to the new member.
3 steps inputs: company, email, firstName, lastName, listId, subscriberHash, tagName outputs: leadId, memberId, tagStatus
1
create-lead
$sourceDescriptions.salesforceRestApi.createRecord
Insert a new Lead record into Salesforce.
2
subscribe-member
$sourceDescriptions.mailchimpMarketingApi.postListsIdMembers
Subscribe the lead to a Mailchimp audience list.
3
tag-member
$sourceDescriptions.mailchimpMarketingApi.postListMemberTags
Apply a segmentation tag to the new Mailchimp member.

Source API Descriptions

Arazzo Workflow Specification

crm-salesforce-lead-to-mailchimp-and-tag-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Lead to Mailchimp Subscribe and Tag
  summary: Create a Salesforce lead, subscribe to Mailchimp, then tag the member.
  description: >-
    A cross-provider workflow that captures a lead in Salesforce, subscribes
    that person to a Mailchimp audience, and applies a tag to the new Mailchimp
    member for segmentation. Demonstrates feeding fresh CRM leads into a nurture
    audience and classifying them in a single orchestration.
  version: 1.0.0
sourceDescriptions:
  - name: salesforceRestApi
    url: https://raw.githubusercontent.com/api-evangelist/salesforce/refs/heads/main/openapi/salesforce-rest-api-openapi.yml
    type: openapi
  - name: mailchimpMarketingApi
    url: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-marketing-api-openapi.yml
    type: openapi
workflows:
  - workflowId: salesforce-lead-to-mailchimp-tag
    summary: Create a Salesforce lead, subscribe to Mailchimp, then tag.
    description: >-
      Inserts a Lead in Salesforce, subscribes the lead email to a Mailchimp
      audience, then adds a segmentation tag to the new member.
    inputs:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        company:
          type: string
        email:
          type: string
        listId:
          type: string
        subscriberHash:
          type: string
        tagName:
          type: string
    steps:
      - stepId: create-lead
        description: Insert a new Lead record into Salesforce.
        operationId: $sourceDescriptions.salesforceRestApi.createRecord
        parameters:
          - name: sobjectType
            in: path
            value: Lead
        requestBody:
          contentType: application/json
          payload:
            FirstName: $inputs.firstName
            LastName: $inputs.lastName
            Company: $inputs.company
            Email: $inputs.email
        successCriteria:
          - condition: $statusCode == 201
          - condition: $response.body#/success == true
        outputs:
          leadId: $response.body#/id
      - stepId: subscribe-member
        description: Subscribe the lead to a Mailchimp audience list.
        operationId: $sourceDescriptions.mailchimpMarketingApi.postListsIdMembers
        parameters:
          - name: list_id
            in: path
            value: $inputs.listId
        requestBody:
          contentType: application/json
          payload:
            email_address: $inputs.email
            status: subscribed
            merge_fields:
              FNAME: $inputs.firstName
              LNAME: $inputs.lastName
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          memberId: $response.body#/id
      - stepId: tag-member
        description: Apply a segmentation tag to the new Mailchimp member.
        operationId: $sourceDescriptions.mailchimpMarketingApi.postListMemberTags
        parameters:
          - name: list_id
            in: path
            value: $inputs.listId
          - name: subscriber_hash
            in: path
            value: $inputs.subscriberHash
        requestBody:
          contentType: application/json
          payload:
            tags:
              - name: $inputs.tagName
                status: active
        successCriteria:
          - condition: $statusCode == 204
        outputs:
          tagStatus: $statusCode
    outputs:
      leadId: $steps.create-lead.outputs.leadId
      memberId: $steps.subscribe-member.outputs.memberId
      tagStatus: $steps.tag-member.outputs.tagStatus