RedPlanetHQ/core

New Integration: Pipedrive

开放

#471 创建于 2026年2月24日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (184 个派生)auto 404
enhancementgood first issueintegrationnew-featurenew-integration

仓库指标

星标
 (1,930 个星标)
PR 合并指标
 (平均合并 3小时 2分钟) (30 天内合并 10 个 PR)

描述

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 system
  • integrations/linear/ - Project management integration
  • integrations/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 deals
  • GET /v1/deals/{id} - Get a specific deal
  • GET /v1/persons - List all contacts/persons
  • GET /v1/organizations - List all organizations
  • GET /v1/activities - List all activities
  • GET /v1/users - List all users
  • GET /v1/pipelines - List all pipelines
  • GET /v1/stages - List all deal stages
  • GET /v1/notes - List all notes
  • GET /v1/recents - Get recent changes (useful for incremental sync)

Events to Track

  1. Deals - Created, updated, won, lost, stage changes
  2. Contacts/Persons - New contacts, updates, merges
  3. Activities - Calls, meetings, tasks, emails logged
  4. Organizations - New organizations, updates
  5. Notes - Notes added to deals, contacts, organizations

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement OAuth 2.0 flow in account-create.ts
  • Create API utilities in utils.ts with Pipedrive API client
  • Implement sync logic in schedule.ts for 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/recents endpoint for efficient incremental syncing
  • Pagination via start and limit parameters
  • Client libraries available for PHP, JavaScript (Node), Python, .NET, and Ruby
  • OpenAPI 3 specification available for import into API tools

Resources

Labels

enhancement, integration, new-feature

贡献者指南