View as Markdown
HubSpot icon

HubSpot ACTION

Search CRM

Search a CRM object type by a single property. Set Object Type, Search Property (internal name, e.g. email or dealname; use Get Properties / Search Properties to find valid names), and Search Value. With Exact Match off, partial (substring) matches are returned. Results are capped per call — if paging.next is present in the response, call again with Offset advanced to fetch the next page. Example: Object Type deal, Search Property dealname, Search Value InGen Annual Contract. Returns matching records plus paging. For lookups, keep results small with Limit and Fields (return only the properties you need). See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's HubSpot account once, then configure and run Search CRM from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "hubspot-search-crm",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    hubspot: { authProvisionId: "apn_xxxxxxx" },
    objectType: "Object Type",
    customObjectType: "Custom Object Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Search CRM inputs
Property Type Description
objectType Object Type string
Type of CRM object to search. For a custom object, set this to custom_object and provide Custom Object Type.
Required
customObjectType Custom Object Type string
Required only when Object Type is custom_object: the object's fullyQualifiedName (e.g. p_my_object) or objectTypeId.
Optional
searchProperty Search Property string
Internal name of the property to search on (e.g. email, dealname, firstname). Use Search Properties or Get Properties to discover valid names for the object type.
Required
searchValue Search Value string
The value to match. With Exact Match on, returns records where Search Property equals this exactly; with it off, returns partial (case-insensitive substring) matches.
Required
exactMatch Exact Match boolean
Set to true to search for an exact match of the search value. If false, partial matches will be returned. Default: true
Optional
additionalProperties Additional properties to retrieve string[]
Internal property names to return in addition to the default set for the object type (e.g. ["amount", "dealstage"]). Use Get Properties to discover valid names.
Optional
fields Fields (projection) string[]
Return ONLY these internal property names per record, instead of the full default set. Use this to keep results small when you only need a few fields (e.g. ["dealname", "amount"]). Overrides Additional properties to retrieve. The Search Property is always included.
Optional
limit Limit integer
Maximum number of records to return (1–200). Lower it for lookups where you only need a few matches, to avoid large results. Defaults to 200.
Optional
createIfNotFound Create if not found? boolean
Set to true to create the object (from Create Properties) when the search returns no match.
Optional
creationProps Create Properties object
Properties for the object to create when Create if not found? is true and nothing matched, as a JSON object of internal property name → value (e.g. { "email": "a@b.com", "firstname": "Ada" }).
Optional
offset Offset integer
The offset to start from. Used for pagination.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
hubspot-search-crm
Version
2.0.1
App
HubSpot
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes