4162b5be55
* feat: remove Revert.dev dependency from Pipedrive integration - Replace Revert API calls with direct Pipedrive OAuth2 and REST API - Update OAuth flow to use Pipedrive's authorization endpoint - Implement token exchange in callback handler - Map Revert's unified API format to Pipedrive's native API structure - Remove REVERT_* environment variables from configuration - Update app config to reflect direct Pipedrive integration - Follow patterns from other CRM integrations like HubSpot Breaking change: Requires PIPEDRIVE_CLIENT_ID and PIPEDRIVE_CLIENT_SECRET environment variables instead of REVERT_* variables Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * feat: implement proper token refresh logic for Pipedrive OAuth - Add token refresh implementation following Pipedrive OAuth2 specification - Use proper Basic Auth for token refresh requests - Handle token refresh errors with appropriate logging - Update access token and expiry date after successful refresh - Add note about database credential update requirement Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * feat: add database credential updates for Pipedrive token refresh - Import updateTokenObjectInDb utility for proper credential management - Store credentialId in constructor for database updates - Update token refresh logic to persist refreshed tokens to database - Follow Cal.com patterns for OAuth credential management - Ensure tokens are properly updated after successful refresh Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * refactor: use OAuthManager for Pipedrive token management - Refactor CrmService.ts to use OAuthManager instead of manual token refresh - Create getPipedriveAppKeys helper function for client credentials - Update callback.ts to use the new helper function - Add requestPipedrive helper method for all API calls - Implement proper token refresh callbacks (isTokenObjectUnusable, isAccessTokenUnusable) This addresses the review comments from hariom and cubic on PR #22492. Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: validate token endpoint response before storing Pipedrive credentials Co-Authored-By: unknown <> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Pipedrive Integration via Revert
Obtaining Pipedrive Client ID and Secret
- Open Pipedrive Developers Corner and sign in to your account, or create a new one
- Go to Settings > (company name) Developer Hub
- Create a Pipedrive app, using the steps mentioned here
- You can skip this step and use the default revert Pipedrive app
- Set
https://app.revert.dev/oauth-callback/pipedriveas a callback url for your app - Get your client_id and client_secret:
- Go to the "OAuth & access scopes" tab of your app
- Copy your client_id and client_secret
Obtaining Revert API keys
- Create an account on Revert if you don't already have one. (https://app.revert.dev/sign-up)
- Login to your revert dashboard (https://app.revert.dev/sign-in) and click on
Customize your apps-Pipedrive - Enter the
client_idandclient_secretyou copied in the previous step - Enter the
client_idandclient_secretpreviously copied toSettings > Admin > Apps > CRM > Pipedriveby clicking theEditbutton on the app settings.