プラットフォーム
特徴
エージェント・スタジオ
エージェントの迅速な構築とカスタマイズ
自律走行エンジン
LLMs を使って会話やタスクを誘導する
知識ベース
カスタムナレッジソースでボットをトレーニング
テーブル
会話データの保存と管理
チャネル
Whatsapp エンブレム
WhatsApp
Instagram エンブレム
Instagram
FacebookMessenger ロゴ
Messenger
Slackのロゴ
Slack
全チャンネル
統合
HubSpot
Notion
Jira
Calendly
すべての統合
LLM プロバイダー
OpenAI
Anthropic
Groq
HuggingFaceロゴ
Hugging Face
すべてLLMs
ソリューション
について
エンタープライズ
ミッションクリティカルな生産ワークフローの自動化
代理店
洗練されたエージェント・サービスの提供
開発者
エージェント開発のための堅牢なAPIを探る
お客様の声
Botpress がどのように世界中のビジネスを変革しているか、成功したお客様からご覧ください。
産業別
電子商取引
教育
ファイナンス
ホスピタリティ
全産業
部門別
売上高
エンジニアリング
製品
ITSM
全部門
ユースケース別
ショッピングアシスタント
リード・ジェネレーション
従業員経験
チケット管理
すべてのユースケース
リソース
エッセンシャル
Academy
キュレーションコースで建築を学ぶ
図書館
AIワークフローを強化するためのリソース
ブログ
Botpress とAIエージェントに関する洞察と最新情報
建物
Discord
何千人もの仲間に加わり、アイデアを共有する
資料
包括的なガイドと参考文献
API
外部システム用参考資料
LLM ランキング
モデルプロバイダーのパフォーマンスとコストを比較
動画
チュートリアル、デモ、製品ウォークスルー
変更履歴
Botpress 最新アップデート情報
パートナー
パートナーになる
認定エキスパートのネットワークに参加
専門家を雇う
パートナーやコンサルタントとつながる
資料
エンタープライズ
価格
ログイン
連絡先登録する
戻るHub

HubSpot Inbox HITL

v3.0.0
ワークスペースにインストールする
Botpress グロース・チーム
  
# HubSpot Custom Channels HITL (Human-in-the-Loop) Integration

This integration enables Botpress to escalate conversations from a chatbot to a live agent in a HubSpot Inbox via Custom Channels. It uses the HubSpot Custom Channels API to create, send, and manage HITL (Human-in-the-Loop) conversations and agent interactions.

## Note: This integration requires one of the following products or higher.
HubSpot Sales Hub - Enterprise

HubSpot Service Hub - Enterprise

### Escalate to Human - Phone Number Requirement

To successfully trigger HITL's **"Escalate to a Human"** card, you must pass a **valid phone number including the country code** into the **"User Email"** field.

> ⚠️ This phone number **must match** the number of an existing contact in HubSpot. If there’s no match, the escalation will not work.

## How It Works

### Conversation Start

- When a user requests live agent support, the bot:
  - Calls HubSpot’s Custom Channels API to start a new conversation thread.
  - Registers the custom channel and sends the initial "Name, title, description" message.

### Message Handling

- All subsequent user messages are:
  - Sent to HubSpot as INCOMING messages through the Custom Channels API.
  - Routed to the appropriate inbox and agent in the HubSpot Conversations UI.

### Operator Events Tracking

The integration listens for HubSpot webhook events, including:
- `operatorAssignedUpdate`: Fires when an agent joins the thread.
- `operatorSendMessage`: Captures replies sent by the agent.
- `operatorConversationCompleted`: Fires when the conversation is closed by the agent.

These events are handled in the `src/events/` directory and forwarded to Botpress via custom events like `hitlAssigned` and `hitlStopped`.

### Closing Conversations

- When an agent marks a conversation as complete, Botpress:
  - Recognizes the event via webhook.
  - Terminates the HITL session and notifies the bot.

## HubSpot Inbox HITL Integration Setup Guide

This guide walks you through connecting your HubSpot Inbox with Botpress using OAuth for Human-in-the-Loop functionality.

### **[Loom video walk through setting up the OAuth configuration.](https://www.loom.com/share/4f1671cfd4fd4063b5e8570830100a44?sid=a22987f8-858b-4ef2-a879-ccac762fb6aa)** ###


### 1. Create a HubSpot Developer Account
- Go to [HubSpot Developer](https://developers.hubspot.com/) and sign up or log in.

### 2. Create a Public App
- Navigate to **Apps** > **Create app**
- Set the **Redirect URL** to your Botpress webhook URL  
  Example: `https://your-botpress-url.com/api/v1/webhooks/hubspot`

### 3. Generate Your Developer API Key
- In your developer portal, go to **Keys**
- Generate a `developer_api_key`

### 4. Configure Your App Credentials in Botpress
In your Botpress integration config, paste the following values:
- `developer_api_key`
- `app ID`
- `client ID`
- `client secret`

### 5. Retrieve Your Inbox ID
- In HubSpot, go to:  
  **CRM** → **Inbox** → **Inbox Settings**
- Copy your Inbox ID from the URL:  
  Example:  
  `https://app-na3.hubspot.com/live-messages-settings/341662569/inboxes/1263703960/channels`  
  Here, the **Inbox ID** is: `1263703960`
- Paste this Inbox ID into your Botpress integration config.

### 6. Set App Scopes and Webhook
- In your public app settings, set the **Scopes** to:
  ```
  conversations.custom_channels.read
  conversations.custom_channels.write
  conversations.read
  conversations.visitor_identification.tokens.create
  conversations.write
  crm.objects.contacts.read
  ```
- Under **Webhooks**, set the **Target URL** to your Botpress webhook URL.

### 7. Subscribe to Webhook Events
Create webhook subscriptions for the following events:
- `conversations.newMessage`
- `conversation.propertyChange` (AssignedTo, Status)

---

## Get Your OAuth Refresh Token

### 1. Get the Authorization Code
Open the following URL in your browser (replace values accordingly):
```bash
https://app.hubspot.com/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=conversations.custom_channels.read%20conversations.custom_channels.write%20conversations.read%20conversations.visitor_identification.tokens.create%20conversations.write%20crm.objects.contacts.read&response_type=code
```

### 2. Exchange the Code for Tokens
Use the following cURL request to get your tokens:
```bash
curl -X POST https://api.hubapi.com/oauth/v1/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=authorization_code" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "redirect_uri=YOUR_BOTPRESS_WEBHOOK_URL" \
  -d "code=YOUR_AUTHORIZATION_CODE"
```

You’ll receive:
- `access_token`
- `refresh_token`
- `expires_in`

Save your `refresh_token` in your Botpress integration settings.

> ⚠️ **Note:** After saving your final integration configuration in Botpress, it may take **over a minute** for the HubSpot channel to connect. **Do not refresh or close the page** during this time.

---

## You're All Set!
Your HubSpot inbox is now connected to Botpress HITL via OAuth. You should now be able to receive and respond to conversations within Botpress.

より良いものを作るBotpress

素晴らしいAIエージェント体験を作り上げよう。

まずはお試しください - 無料です
矢印のアイコン
詳細はこちらBotpress Academy

コース、ガイド、チュートリアルの厳選されたコレクションで、AIエージェントをより良く、より速く構築しましょう。

専門家を雇う

当社の認定デベロッパーと連携して、お客様のニーズに合った専門家ビルダーをお探しください。

全システム稼動
SOC 2
公認
GDPR
準拠
© 2025
プラットフォーム
価格
エージェント・スタジオ
自律走行エンジン
知識ベース
テーブル
Hub
統合
チャネル
LLMs
リソース
営業担当者に相談する
ドキュメンテーション
専門家を雇う
動画
お客様の声
APIリファレンス
ブログ
ステータス
v12リソース
コミュニティ
地域支援
パートナーになる
アンバサダーになる
アフィリエイトになる
会社概要
会社概要
採用情報
ニュース&プレス
法律情報
プライバシー
©Botpress 2025