home / skills / abdullahbeam / nexus-design-abdullah / hubspot-search-deals

hubspot-search-deals skill

/00-system/skills/hubspot/hubspot-search-deals

This skill enables fast HubSpot deal search by name or minimum amount, returning matching deals with key details for quick decision making.

npx playbooks add skill abdullahbeam/nexus-design-abdullah --skill hubspot-search-deals

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.1 KB
---
name: hubspot-search-deals
description: "Search deals in HubSpot CRM by name or amount. Load when user says 'search deals', 'find deal', 'lookup deal', 'deals over $X', 'search for [deal]'."
---

# Search HubSpot Deals

**Specialized skill** for searching deals in HubSpot CRM.

## Pre-Flight Check

Before running, execute config check:
```bash
python 00-system/skills/hubspot/hubspot-master/scripts/check_hubspot_config.py --json
```

If `ai_action` is not `proceed_with_operation`, follow hubspot-connect setup guide.

---

## Usage

### Search by Name
```bash
python 00-system/skills/hubspot/hubspot-master/scripts/search_deals.py \
  --name "Enterprise" \
  --json
```

### Search by Minimum Amount
```bash
python 00-system/skills/hubspot/hubspot-master/scripts/search_deals.py \
  --min-amount 10000 \
  --json
```

### Combined Search
```bash
python 00-system/skills/hubspot/hubspot-master/scripts/search_deals.py \
  --name "Acme" \
  --min-amount 50000 \
  --limit 20 \
  --json
```

---

## Output Format

```json
{
  "total": 5,
  "results": [
    {
      "id": "5840795376",
      "properties": {
        "dealname": "Acme Corp - Enterprise",
        "amount": "50000",
        "dealstage": "qualifiedtobuy",
        "closedate": "2025-03-15T00:00:00Z"
      },
      "url": "https://app.hubspot.com/..."
    }
  ]
}
```

---

## Display Format

```
Found 5 deals matching "Enterprise" (min $10,000):

1. Acme Corp - Enterprise
   Amount: $50,000
   Stage: Qualified to Buy
   Close Date: 2025-03-15
   ID: 5840795376

2. Enterprise Package - Tech Inc
   Amount: $25,000
   Stage: Contract Sent
   ...
```

---

## Search Behavior

- Name search uses `CONTAINS_TOKEN` operator (partial match)
- Amount filter uses `GTE` (greater than or equal)
- Results sorted by creation date (newest first)

---

## Error Handling

| Error | Solution |
|-------|----------|
| 401 | Invalid token - re-run setup |
| 403 | Missing `crm.objects.deals.read` scope |
| 429 | Rate limited - wait and retry |

---

## Related Skills

- `hubspot-list-deals` - List all deals
- `hubspot-update-deal` - Update found deal
- `hubspot-create-deal` - Create if not found

Overview

This skill searches deals in HubSpot CRM by name and/or minimum amount. It returns structured results with deal properties, URL, and total count so you can quickly scan matches. Use natural commands like "search deals", "find deal", or "deals over $X" to trigger it.

How this skill works

The skill queries HubSpot's Deals API using a partial-match name filter (CONTAINS_TOKEN) and an amount filter (GTE) when provided. Results are sorted by creation date (newest first) and returned in JSON with key fields: deal name, amount, stage, close date, id, and URL. It performs a pre-flight config check and reports common errors such as authentication issues or missing scopes.

When to use it

  • Find specific deals by partial or full name.
  • Locate deals above a certain monetary threshold (e.g., deals over $50,000).
  • Combine name and amount filters to narrow results quickly.
  • Audit recent deal activity sorted by newest first.
  • As a first step before updating or creating deals programmatically.

Best practices

  • Run the config check before use to confirm authentication and scopes are valid.
  • Use concise name fragments for broader matches (CONTAINS_TOKEN search).
  • Provide a minimum amount to reduce noise when looking for high-value deals.
  • Limit results when integrating into UI flows to avoid long lists.
  • Handle API rate limits (429) by retrying with exponential backoff.

Example use cases

  • Search for all deals containing "Enterprise" with a minimum amount of $10,000 to prepare a renewal outreach list.
  • Find deals over $100,000 to build a high-value opportunities report.
  • Lookup a specific prospect by name to view stage and close date before a sales call.
  • Combine name and amount filters to locate missed high-priority deals for pipeline cleanup.
  • Run a quick check to confirm whether a new lead already has an associated deal.

FAQ

What fields are returned for each deal?

Each result includes id, dealname, amount, dealstage, closedate, and a URL to the HubSpot deal record.

How does name matching work?

Name searches use a partial-match operator (CONTAINS_TOKEN), so short fragments will match related deal names.

What should I do if I get a 401 or 403 error?

Re-run the pre-flight config check and confirm authentication token and that the app has crm.objects.deals.read scope.