> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scoutos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Salesforce and HubSpot to Your Scout Agents

> Integrate Salesforce and HubSpot with Scout to let agents read and update opportunities, contacts, tasks, deals, and activity timelines automatically.

Your CRM holds the most structured, high-value data your agents can act on — pipeline stages, deal history, contact records, account activity. Connecting it first unlocks the workflows that have the clearest ROI: meeting prep briefs, stale-deal alerts, follow-up drafts, and CRM hygiene automation that would otherwise require manual effort every week.

## Why CRM Integrations Matter

Sales, account, and support teams spend a disproportionate amount of time on data work: looking up records before calls, updating fields after meetings, chasing down deals with no next steps. CRM-connected agents automate this without requiring a process overhaul — they work with the records you already have, in the system you already use.

* **Customer and pipeline data is already structured** — agents can query, filter, and update without extra mapping.
* **The highest-impact automations depend on CRM data** — deal reviews, outreach drafts, record enrichment, and pipeline snapshots all start here.
* **Results are measurable** — you can track time saved, coverage improved, and follow-up completion directly in your CRM.

## Connecting Salesforce

Salesforce supports three connection methods. Use **Quick Connect** for most cases. Use **Custom OAuth App** for enterprise security requirements. Use **JWT Bearer Flow** for server-to-server automation where agents act on behalf of specific users. For step-by-step setup of the custom OAuth and JWT methods, see the [dedicated Salesforce page](/integrations/salesforce).

<Steps>
  <Step title="Open the Integrations page">
    Go to [studio.scoutos.com/integrations](https://studio.scoutos.com/integrations) and click the **Salesforce** card.
  </Step>

  <Step title="Choose your connection method">
    Click **Connect with OAuth** for Quick Connect (recommended for most teams). If your security team requires custom credentials, check **Use custom Salesforce Connected App credentials** and enter your Consumer Key and Consumer Secret from a Salesforce Connected App. For JWT Bearer Flow, select the **Salesforce (User Scoped)** card instead.
  </Step>

  <Step title="Select your environment and authorize">
    Choose **Production** (login.salesforce.com) or **Sandbox** (test.salesforce.com). You'll be redirected to Salesforce to review permissions and click **Allow**.
  </Step>

  <Step title="Verify the connection">
    Back in Scout, your Salesforce workspace should show a green status indicator, the environment type, and the connection date.
  </Step>

  <Step title="Enable Salesforce tools on your agent">
    Open your agent, go to the **Tools** tab, and toggle on the Salesforce tools. Then add the instruction guardrail below to your agent's **Instructions**.
  </Step>
</Steps>

### What Your Agent Can Do with Salesforce

Once connected and enabled, your agent can:

* Execute SOQL queries to find records across any Salesforce object
* Read and summarize opportunities, contacts, accounts, and tasks
* Create and update records with a clear audit trail
* Search across objects using SOSL
* Run bulk operations for large data sets
* Access relationship queries that span multiple objects

<Note>
  The authorizing user's Salesforce permissions apply. If a user can't read a field or object in Salesforce, the agent won't be able to either. Verify field-level security in Salesforce Setup if the agent returns incomplete records.
</Note>

## Connecting HubSpot

HubSpot uses token-based auth through a Private App. You create the app in HubSpot, copy the access token, and paste it into Scout. The whole process takes about five minutes. For a detailed scope breakdown, best practices, and HubSpot-specific troubleshooting, see the dedicated [HubSpot integration page](/integrations/hubspot).

<Steps>
  <Step title="Create a HubSpot Private App">
    In HubSpot, click the **Settings** gear icon → **Integrations** → **Private Apps** → **Create private app**. Name it something recognizable like "Scout CRM Integration."
  </Step>

  <Step title="Configure scopes">
    Under the **Scopes** tab, add the permissions your agent needs. For full CRM access, include read and write scopes for contacts, companies, deals, tickets, and custom objects. Add `timeline`, `automation`, and `crm.lists.read` if you want agents to access activity history and lists. Grant only what you plan to use — you can update scopes later.
  </Step>

  <Step title="Copy your access token">
    Click **Create app**, then copy the access token from the confirmation screen. Treat it like a password — anyone with this token can read and write your CRM data.
  </Step>

  <Step title="Connect to Scout">
    Go to [studio.scoutos.com/integrations](https://studio.scoutos.com/integrations), find **Enhanced HubSpot**, click **Add Workspace**, paste your access token, and click **Create Connection**.
  </Step>

  <Step title="Enable HubSpot tools on your agent">
    Open your agent, go to the **Tools** tab, and toggle on the HubSpot tools. Add the instruction guardrail below to your agent's **Instructions**.
  </Step>
</Steps>

### What Your Agent Can Do with HubSpot

Once connected and enabled, your agent can:

* Look up, create, and update contacts, companies, and deals
* Search and filter records (for example, "Find all open deals over \$50k closing this month")
* Create and manage support tickets
* Read and update custom objects and properties
* Access associations between records — contacts linked to a company, deals linked to a contact
* Manage lists and list membership
* Trigger and check automation workflows

<Tip>
  If your team uses both Salesforce and HubSpot, connect them independently. An agent can use tools from both CRMs in the same workflow — useful for teams that manage enterprise accounts in Salesforce and SMB pipeline in HubSpot.
</Tip>

## Instruction Guardrails for CRM Agents

CRM writes are consequential. A bad update can corrupt a record, create a duplicate, or overwrite data another rep entered. This instruction block prevents the most common mistakes:

```markdown theme={null}
For CRM tasks:

1. Look up the record before writing.
2. Match by stable identifier (record ID, email, domain) before updates.
3. Return the CRM object ID, fields changed, and reason after each write.
4. Ask before creating duplicates when confidence is low.
```

Add this to your agent's **Instructions** before enabling any write tools.

## Prompt Examples

These prompts work once Salesforce or HubSpot is connected and enabled on your agent:

* "Find opportunities in stage `Negotiation` with no activity for 14 days."
* "Create a follow-up task in HubSpot for these five accounts."
* "Update Salesforce notes with this call summary and include next steps."
* "Pull all deals closing this quarter and flag the ones missing a next step."
* "List the last five accounts modified in Salesforce."
* "Find all HubSpot contacts at companies with open deals over \$25k."

## Common Use Cases

**Meeting prep** — Before a customer call, ask your agent to pull the last 90 days of activity, recent emails, open tasks, and deal stage from your CRM. The agent returns a structured brief in seconds, without you opening five different tabs.

**CRM hygiene** — Ask your agent to find deals missing a close date, contacts with no associated company, or opportunities stuck in the same stage for over 30 days. Use it to run a weekly cleanup pass without manual filtering.

**Deal monitoring** — Set up a daily prompt that surfaces at-risk deals — stale stages, low engagement scores, no next-step tasks — and posts a summary to your Slack sales channel. Agents can flag problems before they become missed quarters.

## Next Steps

<CardGroup cols={2}>
  <Card title="Integrations Overview" icon="grid" href="/integrations/overview">
    See the full integration stack and recommended connection order.
  </Card>

  <Card title="Email & Calendar" icon="envelope" href="/integrations/email-calendar">
    Add email context to CRM-driven outreach workflows.
  </Card>

  <Card title="Slack" icon="slack" href="/integrations/slack">
    Route pipeline summaries and deal alerts to team channels.
  </Card>

  <Card title="Google Drive & M365" icon="folder-open" href="/integrations/drive-m365">
    Combine file context with CRM data for richer agent outputs.
  </Card>
</CardGroup>
