Pipedrive Connector
Pipedrive Connector
Connect Pipedrive to Brevo through Tajo to bridge your sales pipeline with marketing automation. Sync contacts, deals, organizations, and activities to power lifecycle campaigns triggered by CRM stage changes.
Overview
| Property | Value |
|---|---|
| Platform | Pipedrive |
| Category | CRM |
| Setup Complexity | Easy |
| Official Integration | No |
| Data Synced | Persons, Deals, Organizations, Activities |
| Available Skills | 8 |
Features
- Contact sync - Bidirectional sync of Pipedrive persons to Brevo contacts
- Deal stage tracking - Trigger Brevo automations based on deal pipeline stage changes
- Organization sync - Map Pipedrive organizations to Brevo company attributes
- Activity tracking - Forward Pipedrive activities (calls, emails, meetings) as Brevo events
- Custom fields - Map Pipedrive custom fields to Brevo contact attributes
- Pipeline reporting - Pull deal pipeline data for marketing attribution
- Lead sync - Import Pipedrive leads into Brevo for nurture campaigns
- Webhook automation - Real-time updates via Pipedrive webhooks
Prerequisites
Before you begin, ensure you have:
- A Pipedrive account with admin access
- Your Pipedrive API Token (found in Settings > Personal preferences > API)
- For OAuth apps: a registered Pipedrive app with Client ID and Client Secret
- A Brevo account with API access
- A Tajo account with API credentials
Authentication
API Token
The simplest authentication method. Find your API Token in Pipedrive under Settings > Personal preferences > API.
curl "https://api.pipedrive.com/v1/persons?api_token=YOUR_API_TOKEN"OAuth 2.0 (Recommended for Apps)
For production applications, use OAuth 2.0:
# Authorization URLhttps://oauth.pipedrive.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI
# Token exchangecurl -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"After obtaining the access token:
curl "https://api.pipedrive.com/v1/persons" \ -H "Authorization: Bearer ACCESS_TOKEN"Configuration
Basic Setup
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: 63Person Field Mapping
Map Pipedrive person fields to Brevo contact attributes:
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_SIZEDeal Stage Mapping
Map Pipedrive pipeline stages to Brevo list assignments:
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 listWebhook Configuration
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 Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/persons | List persons |
POST | /v1/persons | Create a person |
PUT | /v1/persons/{id} | Update a person |
DELETE | /v1/persons/{id} | Delete a person |
GET | /v1/deals | List deals |
POST | /v1/deals | Create a deal |
PUT | /v1/deals/{id} | Update a deal |
GET | /v1/organizations | List organizations |
POST | /v1/organizations | Create an organization |
GET | /v1/activities | List activities |
POST | /v1/activities | Create an activity |
GET | /v1/leads | List leads |
GET | /v1/pipelines | List pipelines |
GET | /v1/stages | List pipeline stages |
GET | /v1/itemSearch | Search across all items |
POST | /v1/webhooks | Create a webhook |
GET | /v1/recents | Get recently modified items |
Code Examples
Initialize Pipedrive Connector
import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({ apiKey: process.env.TAJO_API_KEY, brevoApiKey: process.env.BREVO_API_KEY});
// Connect Pipedrive accountawait tajo.connectors.connect('pipedrive', { apiToken: process.env.PIPEDRIVE_API_TOKEN, companyDomain: 'yourcompany'});Sync Persons to Brevo
// Fetch persons from Pipedriveconst 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 }Track Deal Stage Changes
// Webhook handler for deal updatesapp.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');});Search Across Pipedrive
// Global search across persons, deals, and organizationsconst 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 organizationsRate Limits
| Plan | Limit | Details |
|---|---|---|
| Essential | 80 requests/10 sec | Per API token |
| Advanced | 100 requests/10 sec | Per API token |
| Professional | 200 requests/10 sec | Per API token |
| Power | 200 requests/10 sec | Per API token |
| Enterprise | 400 requests/10 sec | Per API token |
| OAuth apps | 80 requests/2 sec | Per access token |
Additional limits:
| Resource | Limit |
|---|---|
| Per page | 500 records max |
| Webhooks | 40 per account |
| Bulk delete | 100 items/request |
| Search | Standard rate limits |
Rate Limit Headers
Pipedrive returns X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. Implement backoff when X-RateLimit-Remaining approaches zero.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
401 Unauthorized | Invalid API token | Regenerate token in Pipedrive Settings > API |
403 Forbidden | Account permissions | Ensure account has admin access for API usage |
| Persons missing email | No email on record | Filter persons with valid email before syncing |
| Custom fields not mapping | Wrong field key | Use Pipedrive’s field key (hash), not display name |
| Webhooks not received | Firewall blocking | Ensure webhook URL is publicly accessible over HTTPS |
| Duplicate persons | Multiple email records | Use Pipedrive’s merge API before syncing |
429 Too Many Requests | Rate limit exceeded | Implement backoff using X-RateLimit-Reset header |
Best Practices
- Use OAuth for production - Prefer OAuth 2.0 over API tokens for production applications
- Track deal stage changes - Use webhooks to trigger Brevo automations on pipeline stage transitions
- Map custom fields - Use Pipedrive custom field keys (not names) for reliable field mapping
- Handle pagination - Use
startandlimitparameters; checkmore_items_in_collection - Use the Recents endpoint - Poll
/v1/recentsfor incremental syncs instead of full exports - Deduplicate before sync - Merge duplicate persons in Pipedrive before syncing to Brevo
- Use sandbox accounts - Create a developer sandbox account for testing integrations
Security
- API token authentication - Simple token-based access for personal use
- OAuth 2.0 - Secure delegated access for third-party applications
- HTTPS only - All API communication requires TLS encryption
- Webhook HTTPS - Webhooks only delivered to HTTPS endpoints
- Role-based access - Pipedrive permissions respect user roles
- SOC 2 certified - Pipedrive maintains SOC 2 compliance
- GDPR compliance - Supports data export and deletion requests