Skip to main content
Question

How to split a comma-separated string and update HubSpot contact properties

  • January 4, 2026
  • 4 replies
  • 33 views

Hi Zapier community — I’m hoping for guidance on a Formatter / HubSpot mapping issue that I’ve spent a fair bit of time troubleshooting.

What I’m trying to do

I’m capturing Beehiiv survey responses and updating existing HubSpot contacts with the survey data.

  • Beehiiv sends survey responses in a single comma-separated string via the Answer Data field

  • Example value:

    email, job_title, country, phone, linkedin_url
  • I need each value mapped into its own HubSpot contact property (Job Title, Country, Phone, LinkedIn URL)

Zap structure

  1. Trigger: Beehiiv – New Survey Responses

  2. Formatter (Text → Split Text):

    • Input: Answer Data

    • Separator: ,

    • Segment Index: tested both

      • All (as Line-items)

      • All (as Separate Fields)

  3. Formatter (Utilities):

    • Attempting to flatten / name each split value (Item 1–5)

  4. HubSpot – Find Contact

    • Lookup by Email

  5. HubSpot – Update Contact

    • Update existing contact using Contact ID

What works

  • Step 2 does split correctly in the test output:

    1: email
    2: job title
    3: country
    4: phone
    5: linkedin url
  • I can see all five values clearly in the Formatter test panel

The problem

When mapping into Step 5 (Update Contact):

  • Zapier only exposes a single Output field or a grouped array

  • The individual split values (1, 2, 3, etc.) are not selectable or are treated as arrays

  • HubSpot then receives JSON / list-style values instead of scalar strings, e.g.:

    ["Ireland"]

    instead of:

    Ireland

Even when using a second Formatter (Utilities → Line-itemizer), Step 5 often still receives arrays or the full output object rather than clean scalar values.

What I believe is happening

  • Step 2 is sometimes outputting a single field containing line-items, not truly separate scalar fields

  • Because of that, downstream steps (Utilities / HubSpot) cannot reliably reference 1, 2, 3, etc. as individual values

  • This prevents HubSpot from accepting the data into standard contact properties

What I’m looking for guidance on

  • The correct, supported way to:

    • Split a comma-separated string

    • Convert each part into a true scalar field

    • Pass those cleanly into HubSpot Update Contact

  • Whether this requires:

    • A specific Formatter configuration

    • A Looping by Zapier step

    • A known workaround for HubSpot + line-items

If anyone has a known-good pattern for splitting text and updating HubSpot contact properties, I’d really appreciate guidance.

Thanks in advance — happy to provide screenshots or test outputs if helpful.

4 replies

Sparsh from Automation Jinn
Forum|alt.badge.img+6

Hey ​@smullan757,

If you are using All (as Separate Fields), you should be able to select the data directly. 

It really depends on the output data from the trigger. But I think you can probably add one more Formatter step which Utilities → Pick From List and that should help you get your desired workflow.

If it still doesn’t work, you will have to add a Code by Zapier action to do the data extraction. Hope it helps!

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • January 5, 2026

Hi ​@smullan757 

For us to have true context, post screenshots showing the DATA OUT from the Beehiiv Zap trigger step, so we can see the structure of the Q&A.


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • January 28, 2026

Hi there ​@smullan757 👋 Did switching to a Pick from List (Formatter) action, or using Code by Zapier do the trick?

Let us know if you got it sorted, or need any more help at all 🙂


escalateur.com
Forum|alt.badge.img+1

Hi! You could use a Code / Python step like this:

 

→ answer_data = {map your answer data here}

 


email = input_data['answer_data'].split(",")[0]

job_title = (', ').join(input_data['answer_data'].split(",")[1:-3])

country = input_data['answer_data'].split(",")[-3]

phone = input_data['answer_data'].split(",")[-2]

linkedin_url = input_data['answer_data'].split(",")[-1]


return {'Email Address': email, 'Job Title': job_title, 'Country': country, 'Phone Number': phone, 'LinkedIn URL': linkedin_url}

 


 

✅ This code should not break even if the “job_title” value contains a comma (as in “Co-Founder, CEO”)

 

⚠️ This is assuming your data is always coming in the same order. Let us know otherwise and I’ll figure out an alternative more robust code.

 

 

The code

 

 

Step output​​​​​​

 

 

Data available as separate fields

 

This post has been edited by a moderator to remove personally identifiable information (PII). Please remember that this is a public forum and avoid sharing personal or potentially sensitive details.