I've updated the HubSpot integration to properly map to your HubSpot columns:
- ✅ Name (combines firstname + lastname)
- ✅ Phone Number
- ✅ Lead Status
- ✅ Favorite Content Topics
- ✅ Preferred channels
- ✅ Create Date
// When a vote is cast, the voter data is mapped as:
{
firstname: "John", // First part of name
lastname: "Smith", // Rest of name
email: "john.smith@example.com",
phone: "+1-555-123-4567", // Only if provided
hs_lead_status: "NEW", // Valid HubSpot status
lifecyclestage: "subscriber"
}// When a nomination is approved, the nominee data is mapped as:
{
firstname: "Sarah", // First part of name
lastname: "Johnson", // Rest of name
email: "sarah.johnson@company.com",
phone: "", // Empty for nominees (no phone collected)
hs_lead_status: "CONNECTED", // Valid HubSpot status
lifecyclestage: "lead"
}-
✅ Name Splitting:
- Automatically splits full names into
firstnameandlastname - Example: "John Smith" → firstname: "John", lastname: "Smith"
- Automatically splits full names into
-
✅ Email Mapping:
- Direct mapping to HubSpot
emailfield - No changes needed
- Direct mapping to HubSpot
-
✅ Phone Number Mapping:
- Maps to HubSpot
phonefield when available - Only included if phone number is provided
- Voters can provide phone, nominees currently don't
- Maps to HubSpot
-
✅ Valid Lead Status Values:
- Fixed to use valid HubSpot options: "NEW", "CONNECTED", etc.
- Voters get "NEW" status
- Nominees get "CONNECTED" status
# ✅ Successfully created contact with correct mapping:
{
"firstname": "Test",
"lastname": "Mapping Fixed",
"email": "test.mapping.fixed@example.com",
"phone": "+1-555-123-4567",
"hs_lead_status": "NEW"
}-
When someone votes:
- Vote data includes voter info (firstName, lastName, email, phone)
tagVoter()function splits name and maps to HubSpot- Contact created/updated with voter status
-
When nomination is approved:
- Nominee data includes full name and email
tagNominee()function splits name and maps to HubSpot- Contact created/updated with nominee status
- Go to Contacts in your HubSpot account
- Look for contacts with emails like:
john.smith@example.com(voter)test.mapping.fixed@example.com(test contact)
- Verify the fields are populated correctly:
- Name: Should show as "John Smith" (combined from firstname/lastname)
- Email: Should show the full email address
- Phone Number: Should show phone when provided
- Lead Status: Should show "NEW" or "CONNECTED"
When you create custom properties in HubSpot, we can add:
- WSA Category (which award category they're in)
- WSA Year (2026)
- Nominee Name (for voters - who they voted for)
- Vote Count (how many votes they've cast)
The current implementation focuses on the core fields you have set up and uses valid HubSpot standard properties.
The HubSpot integration now correctly maps:
- ✅ Names (split into firstname/lastname)
- ✅ Email addresses
- ✅ Phone numbers (when available)
- ✅ Valid lead status values
- ✅ Proper lifecycle stages