Webflow sync, pageviews & more.
NEW

How can I add tags or other form fields to requests when connecting Mailchimp to Webflow using Logic? I need to segment the audience signing up on my website. I have tried different permutations, but it hasn't worked so far.

TL;DR
  • Use a POST request in Webflow Logic to create a Mailchimp contact with required fields and merge data.
  • Then use a PUT request to add tags via the subscriber_hash (MD5 of lowercase email), ensuring both requests include proper authorization headers.

To segment your Mailchimp audience using tags or additional fields via Webflow Logic, you need to ensure that your Logic workflow sends the correct data structure through the Mailchimp API. This requires custom configuration of the HTTP request step in Logic.

1. Understand Mailchimp's Requirements for Tags

  • When adding tags to a contact in Mailchimp, these are not sent during contact creation but through a separate endpoint: /lists/{list_id}/members/{subscriber_hash}/tags.
  • Tags are an array of objects in the format:
    [{ "name": "Your Tag Name", "status": "active" }]
  • The subscriber_hash is the MD5 hash of the lowercase version of the email address.

2. Set Up Your Initial Mailchimp Connection

  • Use a Custom HTTP request in Webflow Logic.
  • Choose POST method to create a new contact.
  • Use the endpoint:
    https://<dc>.api.mailchimp.com/3.0/lists/{list_id}/members
    Replace <dc> with your data center (e.g., us7), and {list_id} with your actual audience ID.
  • In the Body, include fields like:
  • "email_address": {{email}}
  • "status": "subscribed"
  • "merge_fields": e.g., { "FNAME": "{{first-name}}" } if you're using merge fields.

3. Add Tags After Contact Creation

  • Create a second custom HTTP request in Logic, right after the first one.
  • Use PUT method and this endpoint:
    https://<dc>.api.mailchimp.com/3.0/lists/{list_id}/members/{subscriber_hash}/tags
  • Compute the subscriber_hash using a utility node in Webflow Logic:
  • In the utility step, generate MD5 of {{email | toLowerCase}}
  • In the Body, set:
  • "tags": [{ "name": "Webflow SignUp", "status": "active" }]
  • You can pass multiple tags in the same array.

4. Optional: Add Custom Form Fields

  • Add any additional fields (like phone, interest, etc.) inside "merge_fields" if these are set up in Mailchimp.
  • Example:
  • "merge_fields": { "FNAME": "{{first-name}}", "PHONE": "{{phone}}" }

5. Verify Authentication

  • Ensure each custom HTTP request includes:
  • Basic Auth with your Mailchimp username (can be “anystring”) and API key as password.
  • Use Authorization header:
    • Authorization: Basic base64(anystring:API_KEY)

Summary

To segment Mailchimp users via Webflow Logic, first create the contact (using a POST request), then apply tags with a second request using the subscriber hash. Use custom HTTP requests, correct endpoints, and merge fields for custom data—all authenticated securely.

Rate this answer

Other Webflow Questions