> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withsurface.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 2: Configure HubSpot in Surface Workflow

> Set up workflows in Surface to send form submissions to HubSpot

After configuring your HubSpot form, you need to set up workflows in Surface to send form submissions to HubSpot. This guide covers connecting HubSpot and configuring the workflow action.

## Connect HubSpot to Surface

<Frame>
  <img src="https://mintcdn.com/surfacelabs/-HodhTEcMCQKBRZy/images/integrations/hubspot/1.png?fit=max&auto=format&n=-HodhTEcMCQKBRZy&q=85&s=a5b3910131d261ba006e1853417cb395" alt="HubSpot Integration Setup" width="1913" height="961" data-path="images/integrations/hubspot/1.png" />
</Frame>

1. Navigate to the **Workflow Builder** in Surface
2. Add any HubSpot action and click **Connect**
3. Select your HubSpot organization when prompted
4. Accept Surface Labs invite
5. Click **Connect App** to complete setup

## Create a Workflow

1. Go to **Workflow Builder** from the sidebar
2. Click **Create workflow**
3. Choose trigger type:
   * **Finished** - For complete submissions
   * **Dropped Off** - For partial submissions

## Add HubSpot Action

<Frame>
  <img src="https://mintcdn.com/surfacelabs/-HodhTEcMCQKBRZy/images/integrations/hubspot/2.png?fit=max&auto=format&n=-HodhTEcMCQKBRZy&q=85&s=82fc6462a03b68b10e4dd76aaf042940" alt="HubSpot Actions Selection" width="1200" height="635" data-path="images/integrations/hubspot/2.png" />
</Frame>

1. Click **+ Actions**
2. Select **HubSpot** from the actions list
3. Choose **Create Form Response** action

## Configure Form Response Action

### Select your HubSpot Form

<Frame>
  <img src="https://mintcdn.com/surfacelabs/Wrzlv2TbczC9ZPNA/images/hubspot/configure-workflow/3.png?fit=max&auto=format&n=Wrzlv2TbczC9ZPNA&q=85&s=d05ab303bc146664ae44813845d28401" alt="HubSpot Create Form Response configuration" width="3008" height="1698" data-path="images/hubspot/configure-workflow/3.png" />
</Frame>

1. Click on the **HubSpot Form** dropdown
2. Select the form you want to use for this workflow

### Get Internal Names from HubSpot Form Fields

Before mapping fields, you need to get the **internal names** (also called API names) of your HubSpot form fields. These internal names are what you'll use as the **value** when mapping in Surface workflows.

<Frame>
  <img src="https://mintcdn.com/surfacelabs/Wrzlv2TbczC9ZPNA/images/hubspot/configure-workflow/4.png?fit=max&auto=format&n=Wrzlv2TbczC9ZPNA&q=85&s=2460f4befdd3743aab7de3e0ae59eed1" alt="Finding HubSpot form field internal name" width="3014" height="1682" data-path="images/hubspot/configure-workflow/4.png" />
</Frame>

To find the internal name for each HubSpot form field:

1. In your HubSpot form editor, **select the field** you want to map (e.g., Email or First Name)
2. In the **Edit field** panel on the left, click on **Connected property** (it will show as "Connected" with a green indicator)
3. Under the Connected property section, you'll see the **Internal name** (e.g., `email` or `firstname`)

<Info>
  The internal name is different from the field label. For example, a field labeled "Email Address" might have an internal name of `email` or `emailaddress`. Always use the exact internal name shown in the Connected property section.
</Info>

### Map Surface Form fields to HubSpot form fields

<Frame>
  <img src="https://mintcdn.com/surfacelabs/Wrzlv2TbczC9ZPNA/images/hubspot/configure-workflow/1.png?fit=max&auto=format&n=Wrzlv2TbczC9ZPNA&q=85&s=b297000516cd9fd44c0c0ebb41c55da2" alt="HubSpot Create Form Response configuration" width="3008" height="1698" data-path="images/hubspot/configure-workflow/1.png" />
</Frame>

Now that you have the internal names from HubSpot, map your Surface Form fields:

1. Click on **Add column** button to add a new field mapping
2. **Key (Surface Field)**: Select the field from your Surface Form
   * Example: `email` from Form Submission or Lead
   * Example: `firstName` from Form Submission or Lead
3. **Value (HubSpot Internal Name)**: Enter the exact internal name you found in HubSpot
   * Example: `email` (from the Email field's Connected property)
   * Example: `firstname` (from the First Name field's Connected property)
4. **HubSpot Field**: Select the corresponding HubSpot form field from the dropdown
   * Example: Email
   * Example: First Name

**Mapping Examples:**

| Surface Field (Key)                | HubSpot Internal Name (Value) | HubSpot Field |
| ---------------------------------- | ----------------------------- | ------------- |
| `email` (from Form Submission)     | `email`                       | Email         |
| `firstName` (from Form Submission) | `firstname`                   | First Name    |

<Warning>
  The **Value** field must match the internal name exactly as shown in HubSpot's Connected property section. This is case-sensitive—`email` is different from `Email` or `EMAIL`.
</Warning>

## Configure Additional HubSpot Actions (Optional)

You can add multiple HubSpot actions to your workflow:

* **Create Contact** - Create a new contact in HubSpot
* **Create or Update Contact** - Create or update a contact
* **Create Company** - Create a company record
* **Create Deal** - Create a new deal
* **HubSpot AI Agent** - Use AI to manage contacts and deals automatically

<Frame>
  <img src="https://mintcdn.com/surfacelabs/-HodhTEcMCQKBRZy/images/integrations/hubspot/3.png?fit=max&auto=format&n=-HodhTEcMCQKBRZy&q=85&s=78febdac3e8de75aa7e52b556b8b3c5c" alt="HubSpot AI Agent Configuration" width="1920" height="969" data-path="images/integrations/hubspot/3.png" />
</Frame>
