Search Companies

Find companies that match the provided search criteria.

To narrow your search results, choose All Matching Companies for your result set and search using a single field (for example, Email). You can follow this card with a Filter or Filter Custom function card to further filter the search results.

Search results may exclude newly created and updated HubSpot CRM objects. For best results, wait 10 seconds after using a Create card before calling this card, and 60 seconds after using an Update card. Archived HubSpot CRM objects don't appear in search results.

This card returns a maximum of 10,000 results.

Options

Field Definition Type Required
Result Set Choose whether to return one or all matching companies by selecting from:
  • First Matching Company

  • All Matching Companies

Dropdown

TRUE

Use Filters? Indicates whether to use filters.

Dropdown

TRUE

Filters Operator Type of filter to use. If you set Use Filters? to No, then select -- No Filters --. Otherwise, choose from:
  • Equal to

  • Not equal to

  • Less than

  • Less than or equal to

  • Greater than

  • Greater than or equal to

  • Has property value

  • Does not have property value

  • Contains word

  • Does not contain word

Use the Less than, Less than or equal to, Greater than, and Greater than or equal to operators with numeric properties (for example, Days To Close, or Number of employees).

Dropdown

TRUE

Show Hidden Properties? Select Yes to show properties that are in hidden fields in HubSpot CRM.

Dropdown

TRUE

Input

Field Definition Type Required

The available input fields are dynamically generated based on the properties that are defined for companies in HubSpot CRM. The list available of available properties includes any custom properties that you created for contacts. Select the fields on which to base your search.

This card supports filtering search results using a maximum of three input fields (excluding Custom Filters). Selecting more than three fields results in an error.

The type for a date field can be either Number or Date & Time.

When the field type is Number, you must enter the date in Unix time (milliseconds).

When the field type is Date & Time, enter the date in a standard format (for example, March 26 2021 or 03-26-2021).

Custom Filters HubSpot CRM allows you to create up to three filter groups, each of which can contain up to three filters.

This is an example of a filter checking for entries whose first name is Alice:

Copy
{
"propertyName": "firstname",
"operator": "EQ",
"value": "Alice"
}

Similarly, you can filter entries by whether they have a property:

Copy
{
"propertyName": "enum1",
"operator": "HAS_PROPERTY",
}

You can filter entries that don't have a specific property:

Copy
{
"propertyName": "enum2",
"operator": "NOT_HAS_PROPERTY",
}

Multiple entries in a filter group are combined using a logical AND operator. Consider the following example:

Copy
{
"propertyName": "associations.company",
"operator": "EQ",
"value": "Example"
},
{
"propertyName": "associations.contact",
"operator": "EQ",
"value": "123"
},
{
"propertyName": "associations.deal",
"operator": "EQ",
"value": "456"
}

The results of the preceding filter group would match all entries whose company is Example and the contact ID is 123 and the deal ID is 456.

If you have multiple filter groups, then a logical OR grouping is used to combine their results. As an example, you have three filter groups: filtergrp1, filtergrp2, and filtergrp3. The filters within each group are combined using the AND operator. The resulting entries are compiled by combining the groups using the expression filtergrp1 OR filtergrp2 OR filtergrp3.

Alternatively, suppose that your card has two input properties, input1 and input2, and has a filter group, filtergrp1. Then the resulting set combines the results of: (input1 AND input2) OR filtergrp1.

See the HubSpot CRM Search API for a complete list of supported object types, properties, and operators for use with custom filters.

This card supports a maximum of three custom filter groups. This is possible when no other input fields are selected. For each input that's selected, you can have one less filter group.

List of Objects

FALSE

Output

Your output is either a single company or a list of companies, based on the Result Set option that you chose.

Each company contains a list of property fields which are dynamically generated based on the properties that are defined for companies in HubSpot CRM. This includes any custom properties that you created for companies.

Related topics

HubSpot CRM connector

Workflow elements

HubSpot API Docs