{
  "slug": "combine-mailchimp-with-hubspot-contacts",
  "title": "Combine mailchimp audience with hubspot contacts",
  "metaTitle": "Combine mailchimp audience with - RealComposer",
  "metaDescription": "Combine mailchimp audience with hubspot contacts. Merge Mailchimp and HubSpot in one Frontend / Web call with parallel Worker steps.",
  "headline": "Marketing audience alignment endpoint",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 8,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Mailchimp",
    "HubSpot"
  ],
  "searchIntentQuery": "combine mailchimp audience with hubspot contacts",
  "directAnswerSummary": "List membership from Mailchimp and CRM lifecycle stage from HubSpot. For \"combine mailchimp audience with hubspot contacts\", store MAILCHIMP_BASIC_AUTH, HUBSPOT_ACCESS_TOKEN in Secret Vault, call https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/combine-mailchimp-with-hubspot-contacts with an rc_live_ client token.",
  "problem": {
    "title": "Serial Mailchimp and HubSpot calls slow Frontend / Web pages",
    "explanation": "Each extra Mailchimp and HubSpot hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.",
    "risks": [
      "One slow upstream blocking an entire page",
      "Partial failures leaving UI in inconsistent states",
      "Duplicate auth refresh logic per service"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Create MAILCHIMP_BASIC_AUTH, HUBSPOT_ACCESS_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Configure upstream steps and output mapping",
      "description": "Use GET against https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10. Allowed origins on the client token should match leave cache ttl at 0 when each response is user-specific (include userid or record id in query params before enabling cache)."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/combine-mailchimp-with-hubspot-contacts', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Combine mailchimp audience with hubspot contacts",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "mailchimp",
        "upstreamUrlTemplate": "https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Basic {{secrets.MAILCHIMP_BASIC_AUTH}}"
        },
        "timeoutMs": 3000
      },
      {
        "stepKey": "hubspot",
        "upstreamUrlTemplate": "https://api.hubapi.com/crm/v3/objects/contacts/{{query.contactId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.HUBSPOT_ACCESS_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "mailchimp.memberId",
          "sourcePath": "members.0.id",
          "type": "string",
          "sourceStep": "mailchimp"
        },
        {
          "targetPath": "mailchimp.email",
          "sourcePath": "members.0.email_address",
          "type": "string",
          "sourceStep": "mailchimp"
        },
        {
          "targetPath": "hubspot.contactId",
          "sourcePath": "id",
          "type": "string",
          "sourceStep": "hubspot"
        },
        {
          "targetPath": "hubspot.email",
          "sourcePath": "properties.email",
          "type": "string",
          "sourceStep": "hubspot"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_combine-",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "combine-mailchimp-with-hubspot-contacts"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "mailchimp_memberId": "sample",
    "mailchimp_email": "sample",
    "hubspot_contactId": "sample",
    "hubspot_email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/combine-mailchimp-with-hubspot-contacts\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Which Mailchimp credential belongs in the vault for this pipeline?",
      "answer": "Point Frontend / Web at /recipes/combine-mailchimp-with-hubspot-contacts edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins."
    },
    {
      "question": "Does POST traffic get cached?",
      "answer": "combine-mailchimp-with-hubspot-contacts vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Upstream steps in combine-mailchimp-with-hubspot-contacts honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "merge-airtable-and-sendgrid-templates",
    "stitch-hubspot-contact-with-stripe-history"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/combine-mailchimp-with-hubspot-contacts",
    "markdown": "https://realcomposer.com/recipes/combine-mailchimp-with-hubspot-contacts.md",
    "json": "https://realcomposer.com/recipes/combine-mailchimp-with-hubspot-contacts.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=combine-mailchimp-with-hubspot-contacts&via=agent"
  }
}