HubSpot
HubSpot CRM を Squid に接続して、contacts と companies を検索・取得する
HubSpot connector の機能
HubSpot connector により、Squid AI agents はユーザーに代わって CRM data を検索できます。この connector は現在、contacts と companies への read-only access をサポートしています。
| Capability | Description |
|---|---|
| Search contacts | 検索クエリで contacts を検索し、ID、name、email、company を返します |
| Search companies | 検索クエリで companies を検索し、ID、name、domain、industry を返します |
| Get contact details | 関連付けられた companies を含む、contact の完全な詳細を取得します |
| Get company details | 関連付けられた contacts を含む、company の完全な詳細を取得します |
これらの機能により、ユーザーは AI agent に "Find the contact for Jane at Acme" や "What companies do we have in the healthcare industry?" のように質問でき、agent は HubSpot 内で直接答えを検索します。
この connector は HubSpot CRM v3 API を使用し、HubSpot の rate limits を自動的に処理して、制限に達した場合は backing off と retrying を行います。
HubSpot private app access token の作成
この connector は private app access token を使用して HubSpot に認証します。
-
HubSpot account で、Settings > Integrations > Service Keys に移動します。
-
新しい private app を作成します(または既存のものを開きます)。
-
Scopes tab で、次の read scopes を付与します。
crm.objects.contacts.readcrm.objects.companies.readcrm.schemas.contacts.readcrm.schemas.companies.read
-
app を作成し、その access token をコピーします。
詳細については、HubSpot の private apps に関するドキュメントを参照してください。
Squid application に HubSpot connector を追加する
-
Squid Console の Connectors tab に移動します。
-
Available Connectors をクリックします。
-
HubSpot connector を見つけて、Add Connector を選択します。
-
次の configuration details を入力します。
Connector ID: コード内で connector を一意に識別する文字列です。これは後から変更できません。
Access Token: HubSpot private app の access token です。この token は Squid secret として安全に保存されます。
application で HubSpot connector を使用する
No-code Studio
-
Squid Console の Studio tab に移動します。
-
Create AI Agent をクリックします。
-
"crm-agent" や "This agent helps the user look up contacts and companies in HubSpot" などの agent ID と description を入力します。
-
Add Abilities をクリックします。
-
HubSpot entry を展開し、先ほど作成した HubSpot connector を選択します。
-
"Call this when a user wants to look up CRM contacts or companies." のように、この connection を agent がどのように使用すべきかの description を指定します。
-
Test をクリックし、agent に "Find contacts at Acme" と質問してみます。
Squid SDK の使用
Squid SDK で AI agent を作成している場合は、ask() function の connectedIntegrations option に追加することで HubSpot connector を接続します。
- TypeScript
- Python
await this.squid
.ai()
.agent('AGENT_ID')
.ask('Which of our contacts work at Acme?', {
connectedIntegrations: [
{
integrationId: 'HUBSPOT_CONNECTOR_ID',
integrationType: 'hubspot',
description: 'Call this connector to look up HubSpot contacts and companies',
},
],
});
await squid.ai().agent('AGENT_ID').ask(
'Which of our contacts work at Acme?',
options={
'connectedIntegrations': [
{
'integrationId': 'HUBSPOT_CONNECTOR_ID',
'integrationType': 'hubspot',
'description': 'Call this connector to look up HubSpot contacts and companies',
}
]
},
)
SDK から agent とやり取りする方法の詳細については、AI agent documentation を参照してください。