enhancementgood first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
Add Pipedrive integration to sync CRM data including deals, contacts, activities, and organizations into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/hubspot/- Similar CRM systemintegrations/linear/- Project management integrationintegrations/slack/- For reference on OAuth and messaging
Required Files Structure
integrations/pipedrive/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Pipedrive API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Pipedrive API Integration
OAuth Setup
- Use OAuth 2.0 for public apps (API token for private integrations)
- Authorization URL:
https://oauth.pipedrive.com/oauth/authorize - Token URL:
https://oauth.pipedrive.com/oauth/token - Required scopes:
deals:read,contacts:read,activities:read,organizations:read,users:read - API base URL:
https://api.pipedrive.com/v1/(v2 also available)
Key Endpoints
GET /v1/deals- List all dealsGET /v1/deals/{id}- Get a specific dealGET /v1/persons- List all contacts/personsGET /v1/organizations- List all organizationsGET /v1/activities- List all activitiesGET /v1/users- List all usersGET /v1/pipelines- List all pipelinesGET /v1/stages- List all deal stagesGET /v1/notes- List all notesGET /v1/recents- Get recent changes (useful for incremental sync)
Events to Track
- Deals - Created, updated, won, lost, stage changes
- Contacts/Persons - New contacts, updates, merges
- Activities - Calls, meetings, tasks, emails logged
- Organizations - New organizations, updates
- Notes - Notes added to deals, contacts, organizations
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 flow in
account-create.ts - Create API utilities in
utils.tswith Pipedrive API client - Implement sync logic in
schedule.tsfor deals, contacts, activities - Convert Pipedrive events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Pipedrive API uses REST with JSON output
- Supports CORS
- Stateless API - all requests validated against API token or OAuth
- Both v1 (stable) and v2 (newer) API versions available; recommend starting with v1
- Use
/v1/recentsendpoint for efficient incremental syncing - Pagination via
startandlimitparameters - Client libraries available for PHP, JavaScript (Node), Python, .NET, and Ruby
- OpenAPI 3 specification available for import into API tools
Resources
- Pipedrive API v1 Reference
- Pipedrive Developers Portal
- Pipedrive API v2 Overview
- Getting Started Guide
- API Changelog
Labels
enhancement, integration, new-feature