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 Webflow Logic to capture form data and make two HTTP requests to Mailchimp: a PUT to update or create the subscriber with merge fields and a POST to add tags.
  • Ensure the email is lowercased and MD5 hashed for the subscriber_hash, set correct headers and JSON structure, and verify responses for errors.

To add tags or custom fields to Mailchimp subscribers using Webflow Logic, you need to precisely configure the Logic flow and use Mailchimp's API structure correctly. Many issues arise from incorrect field names or missing steps in the API request.

1. Use the Correct Mailchimp Endpoint

  • To add or update a subscriber and set tags, use the /lists/{list_id}/members/{subscriber_hash} endpoint (for subscriber profile).
  • To apply tags, use the /lists/{list_id}/members/{subscriber_hash}/tags endpoint (must be a separate POST request).
  • subscriber_hash is the MD5 hash of the lowercase version of the subscriber's email address.

2. Create Webflow Logic Flow & Capture Form Data

  • Set your form to submit via Logic instead of built-in Webflow forms integration.
  • Capture email and any custom fields (like first name, interests, etc.) in the Trigger step.
  • Use a “Make HTTP request” step for API interaction.

3. Add Subscriber or Update Merge Fields

  • In your first HTTP step, send a PUT request to https://<dc>.api.mailchimp.com/3.0/lists/{list_id}/members/{subscriber_hash}
  • Headers:
  • Authorization: Basic <base64 encoded 'anystring:API_KEY'>
  • Content-Type: application/json
  • Body (JSON) — example:
    ```
    {
    "email_address": "user@example.com",
    "status_if_new": "subscribed",
    "merge_fields": {
    "FNAME": "John",
    "LNAME": "Doe"
    }
    }
    ```
  • Replace FNAME, LNAME, etc., with your Mailchimp merge tag keys.

4. Add Tags to Subscriber

  • Follow up with a second HTTP request step.
  • POST to https://<dc>.api.mailchimp.com/3.0/lists/{list_id}/members/{subscriber_hash}/tags
  • Body (JSON):
    ```
    {
    "tags": [
    {
    "name": "Webflow Signup",
    "status": "active"
    }
    ]
    }
    ```
  • Replace "Webflow Signup" with your desired tag label.

5. Ensure All Variables Are Set Correctly

  • Use Webflow Logic variables to dynamically pass values (e.g., email, name).
  • Make sure you’re hashing the email in lowercase for the subscriber_hash. You can currently do this using a Custom Code webhook or a third-party service like Make or Zapier, because Logic doesn’t support MD5 hashing natively.

6. Debug with Mailchimp API Response

  • After the Logic run, check the response status code and message from Mailchimp.
  • A 200 or 204 status confirms success.
  • Errors may point to missing fields, invalid merge tags, or auth issues.

Summary

To segment users in Mailchimp using Webflow Logic, you need two separate API requests: one to add or update the subscriber with merge fields, and one to apply tags. Make sure to hash the email correctly and match Mailchimp’s field keys and JSON structure precisely for the requests to work.

Rate this answer

Other Webflow Questions