Download Log in

Recipe: Connecting Forms to CRM (HubSpot + Mailchimp)

User Guide

This recipe shows you how to connect your forms to HubSpot for contact and deal management and to Mailchimp for email list subscription. Both integrations can run simultaneously on the same form.

Part 1: HubSpot Setup

#### Creating the HubSpot Connection

  1. Log in to your HubSpot account at app.hubspot.com
  2. Go to Settings > Integrations > Private Apps
  3. Click Create a Private App
  4. Name it “Form Forge” and add a description
  5. Under Scopes, grant these permissions:
ScopePurpose
crm.objects.contacts.writeCreate and update contacts
crm.objects.contacts.readCheck for existing contacts
crm.objects.deals.writeCreate deals (optional)
crm.objects.deals.readRead deal pipelines (optional)
  1. Click Create App and copy the Access Token
  2. In WordPress, go to Form Forge > Settings > HubSpot
  3. Paste the token into the API-key field and click Connect. Connect is a dedicated action — it validates and stores the token through the Forge API in its own request, and does not submit the whole Settings page. The result appears inline in the HubSpot card: a green “Connected to HubSpot” on success, or the specific error on failure (right there in the card, not as a generic notice at the top of the page). If the card reports a missing site capability token, your license isn’t fully connected yet — connect/activate the license first, then click Connect.

#### Enabling HubSpot on a Form

  1. Open your form in the builder
  2. Go to the Integrations tab
  3. Toggle on HubSpot
  4. Map form fields to HubSpot contact properties:
Form FieldHubSpot Property
Name (first)First Name
Name (last)Last Name
EmailEmail (required)
PhonePhone Number
CompanyCompany Name
PositionJob Title
  1. Optionally enable Create Deal:
– Select a Pipeline (e.g., “Sales Pipeline”)

– Select a Deal Stage (e.g., “New Lead”)

– Set a deal name pattern (e.g., “Lead: {name}”)

  1. Save the form

#### How HubSpot Handles Duplicates

When a form is submitted, HubSpot checks if a contact with that email already exists:

  • New contactCreates a new contact record with all mapped fields
  • Existing contactUpdates the existing contact’s properties with the new submission data (no duplicate is created)
  • DealA new deal is created every time (even for existing contacts), so each submission generates a separate deal

#### HubSpot Submit Saves Locally but Logs “Invalid request”

If the visitor sees the normal success message but formforge_integration_log shows HubSpot status=error, message=Invalid request, and HTTP 400, the request was rejected by the Forge API before HubSpot received it. Current builds normalize empty property maps from PHP ([] -> {}), coerce scalar contact/deal property values to strings, and do not require pipeline or stage fields when Create Deal is off.

Part 2: Mailchimp Setup

#### Creating the Mailchimp Connection

  1. Log in to Mailchimp at login.mailchimp.com
  2. Go to Account > Extras > API Keys
  3. Click Create a Key and copy the key
  4. In WordPress, go to Form Forge > Settings > Mailchimp
  5. Click Connect, paste the API key, and save
  6. Form Forge verifies the connection and stores the key securely on the Forge API server

#### Enabling Mailchimp on a Form

  1. Open your form in the builder
  2. Go to the Integrations tab
  3. Toggle on Mailchimp
  4. Select the Audience (email list) from the dropdown
  5. Map form fields to Mailchimp merge fields:
Form FieldMailchimp Merge Field
EmailEmail Address (required)
Name (first)FNAME
Name (last)LNAME
PhonePHONE
  1. Save the form

#### What Happens with Existing Contacts

Mailchimp handles existing subscribers gracefully:

ScenarioWhat Happens
New email addressContact is added to the audience as a new subscriber
Email already subscribedContact properties are updated with the new data; no duplicate
Email previously unsubscribedThe contact is NOT re-subscribed (Mailchimp respects unsubscribe)
Email in a different audienceA new subscriber is added to the selected audience

Part 3: Field Mapping Strategies

#### Keep Mappings Minimal at First

Start with only the essential fields (email, first name, last name) to verify the integration works. Once confirmed, add more mappings for phone, company, job title, and custom fields.

#### Use Consistent Field Names

If you have multiple forms feeding into the same HubSpot or Mailchimp account, use consistent field labels across forms. This ensures that “Email Address” on Form A maps to the same property as “Email Address” on Form B.

#### Custom Properties and Merge Fields

If your form collects data that does not match a standard HubSpot property or Mailchimp merge field:

  • HubSpot: Create a custom contact property in HubSpot first (Settings > Properties), then map your form field to it
  • Mailchimp: Create a custom merge field in your audience settings (Audience > Settings > Audience fields), then map your form field to it

#### Testing the Combined Setup

  1. Submit the form with a test email address
  2. Check HubSpot: verify the contact was created with correct field values, and the deal if enabled
  3. Check Mailchimp: verify the subscriber was added to the correct audience with correct merge field values
  4. Submit again with the same email: verify HubSpot updates the existing contact (no duplicate) and Mailchimp updates the subscriber

Forge AI Assistant Online

Hi! I'm the Form Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs