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

# Find or create HubSpot record

> Find an existing HubSpot record or create a new one if no match is found.

The Find or Create HubSpot Record action searches for a record in HubSpot and creates one if it doesn't exist. Use it to ensure records are always present — for example, automatically creating a company record when processing a new lead if one doesn't already exist.

<Steps>
  <Step title="Add a Find or Create HubSpot Record action">
    In the [Workflow builder](/workflows/building), click the **+** button between existing blocks. Select **Find or Create HubSpot Record** from the action list.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-0.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=83f5da126d6540084dd7e8b6a4793a91" alt="Clicking the plus button to add a new action in the Workflow builder" width="708" height="276" data-path="images/reference/find-or-create-hubspot-record-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-1.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=18219392891f447390034a3b0fa1f9af" alt="Selecting the Find or Create HubSpot Record action from the action list" width="634" height="398" data-path="images/reference/find-or-create-hubspot-record-img-1.png" />
    </Frame>
  </Step>

  <Step title="Connect your HubSpot account">
    If you haven't already, connect your HubSpot account to Cassidy. This allows Cassidy to access your HubSpot records and create new ones when needed.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-2.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=70b3ee322ce1a1a5db64873e73d3e2a7" alt="HubSpot connection prompt in the action configuration" width="636" height="555" data-path="images/reference/find-or-create-hubspot-record-img-2.png" />
    </Frame>
  </Step>

  <Step title="Rename the action (optional)">
    Enter a more descriptive name to make the action easier to reference as a variable later.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-3.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=e0ec8c92ce10cffc88d275086c0078a0" alt="Renaming the Find or Create HubSpot Record action" width="626" height="124" data-path="images/reference/find-or-create-hubspot-record-img-3.png" />
    </Frame>
  </Step>

  <Step title="Select the record type">
    Choose the HubSpot object type you want to search for or create: **Companies**, **Contacts**, **Deals**, or **Tickets**.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-4.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=4bdaf5dbb4eae6b0f3e5b0fffd8ef320" alt="Selecting the HubSpot object type" width="612" height="143" data-path="images/reference/find-or-create-hubspot-record-img-4.png" />
    </Frame>
  </Step>

  <Step title="Define search criteria">
    Under **Fields to search by**, click **Add Condition** to locate matching records. Select the field to search on, choose an operation (equals, contains, etc.), and enter the value to match. You can add multiple conditions combined with an AND operator. Use variables from the trigger or previous steps to match dynamically.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-5.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=e8e192bdc4a3711be1dcf59d02bcbfe9" alt="Defining search criteria with field conditions to find the record" width="609" height="417" data-path="images/reference/find-or-create-hubspot-record-img-5.png" />
    </Frame>
  </Step>

  <Step title="Select fields to return">
    Under **Fields to return**, click **+ Add Field** and select the HubSpot fields whose values you want to use in subsequent Workflow steps. These fields are returned whether the record was found or newly created. Click the trash icon to remove a selected field.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-6.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=794cc49f7d09fb921b751f7e11bfdbab" alt="Selecting which HubSpot fields to return as output variables" width="616" height="125" data-path="images/reference/find-or-create-hubspot-record-img-6.png" />
    </Frame>
  </Step>

  <Step title="Configure fields for new records">
    Under **Create new object (if no results found)**, map the fields and values to use when creating a new record. Required fields are pre-populated. Click **+ Add Field** to add optional fields, and click the trash icon to remove non-required fields.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-7.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=13b5271e2363a587886291eed3dc6c8c" alt="Mapping fields for creating a new HubSpot record when no match is found" width="636" height="577" data-path="images/reference/find-or-create-hubspot-record-img-7.png" />
    </Frame>
  </Step>
</Steps>

## Sample output

When a matching record is found:

<Frame>
  <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-8.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=0eb93bfcd50fb724b05f73c7c4bde2d6" alt="Sample output when an existing record is found" width="634" height="910" data-path="images/reference/find-or-create-hubspot-record-img-8.png" />
</Frame>

When no match is found and a new record is created:

<Frame>
  <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-9.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=6c07dec55883b28b6a7a47639765f2e9" alt="Sample output when a new record is created" width="624" height="1215" data-path="images/reference/find-or-create-hubspot-record-img-9.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-hubspot-record-img-10.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=dc185d533cfd04c56ec9f23e5119859d" alt="Sample output showing the newly created record details" width="838" height="305" data-path="images/reference/find-or-create-hubspot-record-img-10.png" />
</Frame>

## Related

* [Look Up HubSpot Record](/integrations/hubspot/look-up-record)
* [Update HubSpot Record](/integrations/hubspot/update-record)
* [Create HubSpot Association](/integrations/hubspot/create-association)
* [HubSpot for Workflows](/integrations/hubspot/workflows)
