Pipedrive コネクター

Pipedrive コネクター

Pipedrive を Tajo 経由で Brevo に接続して、営業パイプラインとマーケティングオートメーションを橋渡しします。コンタクト、取引、組織、アクティビティを同期することで、CRM のステージ変更をきっかけとするライフサイクルキャンペーンを実現できます。

概要

項目
プラットフォームPipedrive
カテゴリーCRM
セットアップ難易度容易
公式統合なし
同期データ個人、取引、組織、アクティビティ
利用可能なスキル8

機能

  • コンタクト同期 - Pipedrive の個人と Brevo コンタクトを双方向同期
  • 取引ステージ追跡 - 取引パイプラインのステージ変更で Brevo オートメーションをトリガー
  • 組織同期 - Pipedrive 組織を Brevo の会社属性にマッピング
  • アクティビティ追跡 - Pipedrive のアクティビティ (通話、メール、会議) を Brevo イベントとして転送
  • カスタムフィールド - Pipedrive カスタムフィールドを Brevo コンタクト属性にマッピング
  • パイプラインレポート - マーケティングアトリビューション向けに取引パイプラインデータを取得
  • リード同期 - Pipedrive のリードをナーチャリングキャンペーン用に Brevo へ取り込み
  • ウェブフック自動化 - Pipedrive ウェブフックによるリアルタイム更新

前提条件

開始する前に、以下をご用意ください。

  1. 管理者権限のある Pipedrive アカウント
  2. Pipedrive の API トークン (Settings > Personal preferences > API にあります)
  3. OAuth アプリの場合: 登録済み Pipedrive アプリの Client ID と Client Secret
  4. API アクセス付きの Brevo アカウント
  5. API 認証情報を持つ Tajo アカウント

認証

API トークン

最もシンプルな認証方式です。Pipedrive の Settings > Personal preferences > API に API トークンがあります。

Terminal window
curl "https://api.pipedrive.com/v1/persons?api_token=YOUR_API_TOKEN"

OAuth 2.0 (アプリ向け推奨)

本番アプリケーションには OAuth 2.0 を使用してください。

Terminal window
# Authorization URL
https://oauth.pipedrive.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI
# Token exchange
curl -X POST https://oauth.pipedrive.com/oauth/token \
-d "grant_type=authorization_code" \
-d "code=AUTH_CODE" \
-d "redirect_uri=REDIRECT_URI" \
-u "CLIENT_ID:CLIENT_SECRET"

アクセストークン取得後:

Terminal window
curl "https://api.pipedrive.com/v1/persons" \
-H "Authorization: Bearer ACCESS_TOKEN"

設定

基本セットアップ

connectors:
pipedrive:
enabled: true
api_token: "your-pipedrive-api-token"
company_domain: "yourcompany" # yourcompany.pipedrive.com
# Data sync options
sync:
persons: true
deals: true
organizations: true
activities: true
leads: true
# Brevo list assignment
lists:
all_contacts: 60
qualified_leads: 61
customers: 62
churned: 63

個人フィールドマッピング

Pipedrive の個人フィールドを Brevo コンタクト属性にマッピングします。

person_mapping:
email: email
name: FULLNAME
first_name: FIRSTNAME
last_name: LASTNAME
phone: SMS
org_id.name: COMPANY
# Deal-related computed fields
won_deals_count: WON_DEALS
lost_deals_count: LOST_DEALS
open_deals_count: OPEN_DEALS
closed_deals_count: CLOSED_DEALS
total_revenue: LTV
# Custom fields (use Pipedrive field key)
custom_fields.lead_source: LEAD_SOURCE
custom_fields.industry: INDUSTRY
custom_fields.company_size: COMPANY_SIZE

取引ステージのマッピング

Pipedrive のパイプラインステージを Brevo のリスト割当にマッピングします。

deal_stage_mapping:
# stage_id -> brevo_list_id
1: 61 # Lead In
2: 61 # Contact Made
3: 62 # Proposal Made
4: 62 # Negotiations Started
"won": 63 # Won -> Customers list
"lost": 64 # Lost -> Win-back list

ウェブフック設定

webhooks:
- event_action: "added"
event_object: "person"
brevo_event: "contact_created"
- event_action: "updated"
event_object: "person"
brevo_event: "contact_updated"
- event_action: "added"
event_object: "deal"
brevo_event: "deal_created"
- event_action: "updated"
event_object: "deal"
brevo_event: "deal_updated"
- event_action: "merged"
event_object: "person"
brevo_event: "contact_merged"
- event_action: "added"
event_object: "activity"
brevo_event: "activity_logged"

API エンドポイント

メソッドエンドポイント説明
GET/v1/persons個人一覧
POST/v1/persons個人を作成
PUT/v1/persons/{id}個人を更新
DELETE/v1/persons/{id}個人を削除
GET/v1/deals取引一覧
POST/v1/deals取引を作成
PUT/v1/deals/{id}取引を更新
GET/v1/organizations組織一覧
POST/v1/organizations組織を作成
GET/v1/activitiesアクティビティ一覧
POST/v1/activitiesアクティビティを作成
GET/v1/leadsリード一覧
GET/v1/pipelinesパイプライン一覧
GET/v1/stagesパイプラインステージ一覧
GET/v1/itemSearch全アイテム横断検索
POST/v1/webhooksウェブフック作成
GET/v1/recents最近変更されたアイテム取得

コード例

Pipedrive コネクターの初期化

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Connect Pipedrive account
await tajo.connectors.connect('pipedrive', {
apiToken: process.env.PIPEDRIVE_API_TOKEN,
companyDomain: 'yourcompany'
});

個人を Brevo に同期

// Fetch persons from Pipedrive
const response = await fetch(
`https://api.pipedrive.com/v1/persons?start=0&limit=100&api_token=${API_TOKEN}`
);
const { data, additional_data } = await response.json();
// data: [{ id, name, first_name, last_name, email, phone, org_id, ... }]
// additional_data.pagination: { start, limit, more_items_in_collection }

取引ステージ変更の追跡

// Webhook handler for deal updates
app.post('/webhooks/pipedrive', async (req, res) => {
const { meta, current, previous } = req.body;
if (meta.object === 'deal' && meta.action === 'updated') {
// Detect stage change
if (current.stage_id !== previous.stage_id) {
await tajo.connectors.handleWebhook('pipedrive', {
topic: 'deal.stage_changed',
payload: {
dealId: current.id,
dealTitle: current.title,
previousStage: previous.stage_id,
newStage: current.stage_id,
personId: current.person_id,
value: current.value,
currency: current.currency
}
});
}
}
res.status(200).send('OK');
});

Pipedrive 全体検索

// Global search across persons, deals, and organizations
const query = encodeURIComponent('[email protected]');
const response = await fetch(
`https://api.pipedrive.com/v1/itemSearch?term=${query}&item_types=person,deal&api_token=${API_TOKEN}`
);
const { data } = await response.json();
// Returns matching persons, deals, and organizations

レート制限

プラン制限詳細
Essential80 リクエスト/10 秒API トークンごと
Advanced100 リクエスト/10 秒API トークンごと
Professional200 リクエスト/10 秒API トークンごと
Power200 リクエスト/10 秒API トークンごと
Enterprise400 リクエスト/10 秒API トークンごと
OAuth アプリ80 リクエスト/2 秒アクセストークンごと

追加制限:

リソース制限
1 ページあたり最大 500 レコード
ウェブフックアカウントあたり 40
一括削除100 件/リクエスト
検索標準レート制限

レート制限ヘッダー

Pipedrive は X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset ヘッダーを返します。X-RateLimit-Remaining がゼロに近づいたらバックオフを実装してください。

トラブルシューティング

問題原因解決策
401 Unauthorized無効な API トークンPipedrive の Settings > API でトークンを再生成
403 Forbiddenアカウント権限不足アカウントに API 利用のための管理者権限を付与
個人にメールがないレコードにメールなし同期前に有効なメールを持つ個人でフィルタ
カスタムフィールドが未マッピングフィールドキーが不正表示名ではなく Pipedrive のフィールドキー (ハッシュ) を使用
ウェブフックが受信されないファイアウォールでブロックウェブフック URL が HTTPS で公開されていることを確認
重複した個人複数のメールレコード同期前に Pipedrive のマージ API を使用
429 Too Many Requestsレート制限超過X-RateLimit-Reset ヘッダーでバックオフを実装

ベストプラクティス

  1. 本番では OAuth を利用 - 本番アプリケーションでは API トークンより OAuth 2.0 を優先
  2. 取引ステージ変更を追跡 - ウェブフックでパイプラインステージ遷移時に Brevo オートメーションをトリガー
  3. カスタムフィールドをマッピング - Pipedrive のカスタムフィールドキー (名前ではなく) を使って確実にマッピング
  4. ページネーションを処理 - startlimit パラメータを使用し、more_items_in_collection を確認
  5. Recents エンドポイントを活用 - フルエクスポートの代わりに /v1/recents をポーリングして増分同期
  6. 同期前に重複排除 - 同期前に Pipedrive で重複した個人をマージ
  7. サンドボックスを利用 - 統合テスト用に開発者サンドボックスアカウントを作成

セキュリティ

  • API トークン認証 - 個人利用向けシンプルなトークンベースアクセス
  • OAuth 2.0 - サードパーティアプリ向けの安全な委任アクセス
  • HTTPS のみ - すべての API 通信に TLS 暗号化必須
  • ウェブフック HTTPS - ウェブフックは HTTPS エンドポイントにのみ配信
  • ロールベースアクセス - Pipedrive の権限はユーザーロールに従う
  • SOC 2 認証 - Pipedrive は SOC 2 コンプライアンスを維持
  • GDPR 準拠 - データのエクスポートと削除リクエストに対応

関連リソース

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

AIアシスタント

こんにちは!ドキュメントについて何でもお聞きください。

Brevoで無料で始める