View as Markdown
HubSpot icon

HubSpot ACTION

Search CRM Objects

Search HubSpot CRM records (contacts, companies, deals, tickets, etc.) using text queries or filters. Returns matching records with properties, pagination, and total count. Use the query parameter for simple text search across default searchable fields (contacts: firstname, lastname, email, phone, company; companies: name, website, domain, phone; deals: dealname, pipeline, dealstage, description). Use filterGroups for advanced filtering with operators like EQ, NEQ, LT, GT, CONTAINS_TOKEN, IN, HAS_PROPERTY, etc. You can combine up to 5 filter groups (OR logic) with up to 6 filters each (AND logic within a group). Supports standard object types only (contacts, companies, deals, tickets, etc.). For custom objects, use List Custom Object Schemas to discover available types, then List Custom Objects to list records. 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 Objects 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-objects",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    hubspot: { authProvisionId: "apn_xxxxxxx" },
    objectType: "Object Type",
    query: "Query",
  },
})

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 Objects inputs
Property Type Description
objectType Object Type string
The CRM object type to search.
Required
query Query string
Text to search across default searchable properties of the object type. Uses simple text matching (contains). Each object type has different searchable properties: contacts (firstname, lastname, email, phone, company), companies (name, website, domain, phone), deals (dealname, pipeline, dealstage, description, dealtype), tickets (subject, content, hs_pipeline_stage, hs_ticket_category, hs_ticket_id). Max 200 characters.
Optional
filterGroups Filter Groups string
JSON array of filter groups for advanced filtering. Each group contains filters (AND logic within a group) and groups are OR'd together. Each filter has propertyName, operator, and value. Operators: EQ, NEQ, LT, LTE, GT, GTE, BETWEEN, IN, NOT_IN, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN, NOT_CONTAINS_TOKEN. Example: [{"filters": [{"propertyName": "lifecyclestage", "operator": "EQ", "value": "lead"}]}]. Max 5 groups, 6 filters per group, 18 total.
Optional
properties Properties string[]
Property names to include in results. If not specified, returns a default set of common properties for the object type. Use Search Properties to discover available property names.
Optional
sorts Sorts string
JSON array of sort rules. Only one sort rule is supported. Example: [{"propertyName": "createdate", "direction": "DESCENDING"}]. Default: sorted by createdate descending.
Optional
limit Limit integer
Maximum number of results per page. Max: 200, default: 100.
Optional
after After (Pagination Cursor) string
Paging cursor from a previous response for retrieving the next page of results.
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-objects
Version
0.0.9
App
HubSpot
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes