FlowmageDocs

Search records

BetaReads data

Finds HubSpot records by property filters, sorted, with paging.

Settings

SettingWhat it is
ConnectionRequiredThe HubSpot connection the step signs in with.
Object"contacts" or "companies" or "deals" or "tickets" or "notes" or "tasks" or "calls" or "meetings" or "emails" or "leads" or "products" or "line_items" or "custom"
Custom object type idThe object type id, e.g. 2-1234567. The List properties node shows it.
Free textSearches the object's default searchable properties. Leave empty to filter only.
FiltersOne object per filter. Rows with the same group are ANDed together; different groups are ORed. Values may carry {{ }}, so a filter can come from an earlier node.
Sort byOne property only — HubSpot accepts exactly one sort per search.
Direction"ASCENDING" or "DESCENDING"
Properties to fetchComma-separated. HubSpot leaves out anything you do not ask for.
Records per call1 to 200. HubSpot's own default is 10, so this is always sent.
Start afterA whole number: how many results to skip. HubSpot never answers past the 10,000th result of one search.
Fetch every pageFollows HubSpot's paging cursor, and refuses past 5,000 records rather than answering a short list.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `hubspot`)
object"contacts" or "companies" or "deals" or "tickets" or "notes" or "tasks" or "calls" or "meetings" or "emails" or "leads" or "products" or "line_items" or "custom", by default "contacts"
customObjectTypetextused when `object` is "custom"
querytextits `{{ }}` must give a string
filterslist of {group?: "1" or "2" or "3" or "4" or "5", propertyName?: text, operator?: "EQ" or "NEQ" or "LT" or "LTE" or "GT" or "GTE" or "BETWEEN" or "IN" or "NOT_IN" or "HAS_PROPERTY" or "NOT_HAS_PROPERTY" or "CONTAINS_TOKEN" or "NOT_CONTAINS_TOKEN", value?: text, highValue?: text}, by default []
sortPropertytext
sortDirection"ASCENDING" or "DESCENDING", by default "DESCENDING"
propertiestext
limitnumber, by default 100
aftertext
returnAlltrue/false, by default false

Output

FieldType
recordsarray
recordCountRecords in this answernumber
totalHow many HubSpot countednumber
hasMoreMore records are waiting behind this pageboolean
nextCursorCursor for the next pagestring
Sample output, and the expression for each field
  • hasMorefalse
  • nextCursor""
  • recordCount0
  • records[]
  • total0

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "after": "",
    "connection": "<connection id>",
    "customObjectType": "",
    "filters": [],
    "limit": 100,
    "object": "contacts",
    "properties": "",
    "query": "",
    "returnAll": false,
    "sortDirection": "DESCENDING",
    "sortProperty": ""
  },
  "label": "Search records",
  "type": "hubspot.searchRecords",
  "version": 1
}