- Find all deals in a specific stage
- Get contacts matching certain criteria
- Search for companies by property values
- Pull records for bulk processing
hubspot.v2.search_objects
How It Works
This action searches your HubSpot CRM and returns a list of matching records. You choose what type of object to search (contacts, deals, etc.), optionally add filters to narrow results, and select which properties to get back. The results are saved to a variable you can use in later actions—usually in a loop to process each record.Setting It Up
Step 1: Choose Object Type
When you add the Search HubSpot action, you’ll see clickable cards for each object type:- Contacts - People in your CRM
- Companies - Organizations
- Deals - Sales opportunities
- Tickets - Support tickets
- Calls - Call records
- Emails - Email engagement records
- Meetings - Meeting records
- Notes - Notes attached to records
- Tasks - Tasks in HubSpot
Step 2: Add Search Filters (Optional)
After selecting the object type, you’ll see a “Search Contact Properties” section (or “Search Deal Properties”, etc. depending on your object type). Leave it empty to get all records (up to your limit). To add filters:- Click the ”+ Add Property” button
- This opens the property picker - select a property to filter by (e.g., “City”, “Deal Stage”, “Lifecycle Stage”)
- Click Done
- Property name (e.g., “City”)
- Operator dropdown - Choose how to compare:
- Equals - Exact match
- Not Equals - Doesn’t match
- Contains - Text contains this value
- Greater Than - Number/date is greater
- Less Than - Number/date is less
- Greater Than or Equal
- Less Than or Equal
- Has Property - Property has any value
- Not Has Property - Property is empty
- Value field - Enter the value or click
{}
to insert a variable
- Property: Deal Stage
- Operator: Equals
- Value: “closedwon”
- Property: City
- Operator: Equals
- Value: “San Francisco”
- Property: Amount
- Operator: Greater Than
- Value: “10000”
- Property: Last Contact Date
- Operator: Less Than
- Value: Click
{}
→ selectthirty_days_ago
variable
{}
button in the value field to insert a variable from previous actions or the trigger.
Example: Filter by a stage that was sent via webhook
- Property: Deal Stage
- Operator: Equals
- Value: Click
{}
→ selecttarget_stage
(from webhook)
- Use the property picker to avoid typos in property names
- Operator choice matters: “Equals” requires exact match, “Contains” is more flexible
- Use Greater Than/Less Than for numbers and dates
- Values are case-sensitive for exact matches
Step 3: Choose Properties to Retrieve
In the “Retrieve Contact Properties” section (or “Retrieve Deal Properties”, etc.), click the ”+ Add Property” button to select which HubSpot properties you want to get back in your search results. This opens a property picker modal showing:- Search bar at the top
- List of all available properties for that object type
- Click properties to select them (they’ll show a checkmark)
- Click Done when finished
- Only select what you’ll actually use (faster searches)
- Always include
hs_object_id
if you’ll update records or look up related data later - Use the search bar to quickly find properties
- Common properties for contacts:
firstname
,lastname
,email
,phone
- Common properties for deals:
dealname
,dealstage
,amount
,closedate
,hs_object_id
Step 4: Sort Results (Optional)
Choose how to order your results by entering a sort value. Examples:createdate
- Oldest first-createdate
- Newest first (the minus sign means descending)amount
- Smallest to largest-amount
- Largest to smallest
Step 5: Set Result Limit (Optional)
Enter the maximum number of results to return. Default: 100 Maximum: 1000 When to adjust:- Testing? Use 10-20 to run faster
- Production? Set based on how many you expect (100-500 is common)
- Processing in a loop? Remember that 1000 records takes time!
Step 6: Name Your Output Variable
Give the search results a descriptive name in the “Output Variable Name” field. Good names:qualified_deals
inactive_contacts
target_companies
recent_tickets
What You Get Back
The search returns a list of objects. Each object contains the properties you selected in Step 3. Example: If you searched for deals and selected propertiesdealname
, amount
, hs_object_id
:
Output saved to qualified_deals
:
Using the Results
In a For Loop (Most Common)
After your search action, add a For Loop action:- Loop through: Click to select your search results variable (e.g.,
qualified_deals
) - Current item variable: Give each item a name (e.g.,
current_deal
)
{}
icon) and navigate:
- Select
current_deal
- Then select the property you want (e.g.,
dealname
,amount
,hs_object_id
)
- Object ID: Insert variable →
current_deal
→hs_object_id
- Property to update: Insert variable →
current_deal
→dealname
Count How Many Results
Want to know how many records matched? Add a Set Variable action after the search and use the variable picker to count the items in your results array.Get Just the First Result
To grab only the first record, use the variable picker to select the first item from your results array in any subsequent action.Common Workflows
Find and Update Pattern
Goal: Search for records, then update each one-
Search HubSpot (V2)
- Object Type: Deals
- Search Filters: Click ”+ Add Property”
- Property: Deal Stage
- Operator: Equals
- Value: “presentationscheduled”
- Retrieve Properties: Click ”+ Add Property” and select
dealname
,hs_object_id
- Output Variable:
deals_to_update
-
For Loop
- Loop through:
deals_to_update
- Current item:
current_deal
- Loop through:
-
Update HubSpot Object (V2) - inside loop
- Object ID: Insert variable →
current_deal
→hs_object_id
- Update whatever properties you need
- Object ID: Insert variable →
- End Loop
Search Using Trigger Data
Goal: Use data from a webhook to filter your search Webhook receives:target_stage
variable
-
Search HubSpot (V2)
- Object Type: Deals
- Search Filters: Click ”+ Add Property”
- Property: Deal Stage
- Operator: Equals
- Value: Click
{}
→ selecttarget_stage
(from webhook)
- Output Variable:
matching_deals
- Process the results…
Daily Report
Goal: Count records and send an email-
Search HubSpot (V2)
- Object Type: Tickets
- Search Filters: Click ”+ Add Property”
- Property: Ticket Pipeline Stage
- Operator: Equals
- Value: “open”
- Limit: 1000
- Output Variable:
open_tickets
-
Set Variable
- Variable name:
ticket_count
- Value: Use variable picker to count
open_tickets
- Variable name:
-
Send Email
- Subject: Type “You have ” then insert
ticket_count
variable
- Subject: Type “You have ” then insert
Real Examples
Daily Deal Health Check
Scenario: Every morning at 9 AM, find all deals in “Presentation Scheduled” stage. Trigger: Schedule (daily at 9:00 AM) Search Configuration:- Object Type: Deals
- Search Filters: Click ”+ Add Property”
- Property: Deal Stage
- Operator: Equals
- Value: “presentationscheduled”
- Retrieve Properties: Click ”+ Add Property” and select:
dealname
dealstage
amount
closedate
hs_object_id
hubspot_owner_id
- Sort: Select “Create Date” descending (newest first)
- Limit: 50
- Output Variable:
active_deals
active_deals
and analyze each one.
Find Contacts from Form Submission
Scenario: When someone submits a form, find their contact record. Webhook receives:email
variable from HubSpot form
Search Configuration:
- Object Type: Contacts
- Search Filters: Click ”+ Add Property”
- Property: Email
- Operator: Equals
- Value: Click
{}
→ selectemail
(from webhook)
- Retrieve Properties: Click ”+ Add Property” and select:
firstname
lastname
email
hs_object_id
- Limit: 1 (expecting only one match)
- Output Variable:
found_contact
Troubleshooting
No Results Found
The search returns an empty list[]
Possible causes:
- No records actually match your filters
- Property name is misspelled in filters
- Property value doesn’t match exactly
- Go to HubSpot and manually search using the same criteria—do records exist?
- Double-check property names (they’re case-sensitive!)
- Look at an actual HubSpot record to see the exact value format
- Try removing filters one by one to see which is excluding results
Missing Properties in Results
Records come back but properties you selected aren’t showing up Possible causes:- You didn’t add that property using ”+ Add Property”
- The property is actually empty in HubSpot
- Property was added but not saved before running
- Make sure you clicked ”+ Add Property” and selected all properties you need
- Check an actual HubSpot record—does it have values for those properties?
- Re-add the property and save the action
- Check the execution log to see exactly what was returned
”Missing OAuth Scope” Error
You don’t have permission to access that object type How to fix:- Go to Settings → Integrations
- Click “Reconnect” on HubSpot
- Make sure you check the box to authorize access to that object type
- Save and try the search again
- Contacts: “Read Contacts”
- Companies: “Read Companies”
- Deals: “Read Deals”
- Tickets: “Read Tickets”
Search is Slow (Takes 10+ Seconds)
Possible causes:- Returning too many results
- Requesting too many properties
- HubSpot account has millions of records
- Add filters to narrow the search scope
- Lower the limit (100 instead of 1000)
- Request fewer properties (only what you need)
- Add specific filters like date ranges instead of searching everything
Tips & Best Practices
✅ Do:- Always include
hs_object_id
in your properties if you’ll update or reference records later - Use the ”+ Add Property” button to browse and select from your actual HubSpot properties
- Start with small limits while testing (10-20), then increase for production
- Test your filters in HubSpot’s UI first to verify they return the right records
- Use descriptive output variable names
- Add filters to narrow results whenever possible
- Search for all records without filters (could return thousands!)
- Request every property when you only need a few
- Forget to set a limit (defaults to 100 but be explicit)
- Assume all properties have values—some might be empty
- Use misspelled property names in filters
- Filters make searches faster—use them!
- Limit results to what you need (don’t fetch 1000 if you’ll only process 50)
- If looping through results, remember each iteration takes time
- The fewer properties you request, the faster the search
Advanced Filtering
The simpleproperty=value
format works for exact matches. For more complex scenarios like:
- “Greater than” or “less than” comparisons
- Date range filtering
- OR logic between filters
- “Contains” text searches
Related Actions
What to do next:- For Loop - Process search results one by one
- Update HubSpot Object (V2) - Update records you found
- Lookup HubSpot Object (V2) - Get full details for specific records
- If Condition - Filter results based on conditions
- Variable System - Using search results in other actions
- Webhook Triggers (HubSpot) - Use webhook payloads to drive searches
- Deal Analysis Workflow - Complete example
Last Updated: 2025-10-01