Overview
CrewAI supports integration with Salesforce CRM, enabling your crews to interact with Accounts, Contacts, Leads, Opportunities, Cases, Campaigns, Tasks, Orders, and Products. The integration includes SOQL/SOSL query support.Prerequisites
- A Salesforce org (any edition with API access)
- System Administrator or equivalent permissions to create External Client Apps
- API access enabled for the org
Salesforce External Client App Setup
Step 1: Access Setup
- Log in to your Salesforce org
- Navigate to Setup (gear icon → Setup)
- In Quick Find, search for External Client App Manager
- Click New External Client App
Step 2: Create an External Client App
-
Fill in the basic information:
- External Client App Name: Enter a name (e.g., “CrewAI Integration”)
- API Name: Auto-populated from the name
- Contact Email: Your admin email
- Distribution State: Leave as Local
- Under API (Enable OAuth Settings), check Enable OAuth Settings
-
Set the Callback URL:
Default configuration (NGINX with shared hostname):
Separate OAuth hostname (GKE/ALB with
path: "/"):See OAuth Redirect URI Patterns for the correct redirect URI format based on your ingress configuration. -
Under Selected OAuth Scopes, add the following (see Required Scopes below):
- Manage user data via APIs (api)
- Perform requests at any time (refresh_token, offline_access)
- Access unique user identifiers (openid)
- Access the identity URL service (profile, id)
- Click Save
Step 3: Get Your Credentials
- After saving, click Manage Consumer Details and verify your identity
- Copy the Consumer Key (Client ID) and Consumer Secret (Client Secret)
Step 4: Configure Security Policies
- Go back to the External Client App and click Manage
- Click Edit Policies
- Under OAuth Policies:
- Set Permitted Users to All users may self-authorize
- Set IP Relaxation to Relax IP restrictions (recommended for server-to-server use)
- Set Refresh Token Policy to Refresh token is valid until revoked
- Click Save
Required Scopes
The
api scope grants access to all standard and custom objects. Salesforce does not support granular per-object scoping through OAuth — object-level access is controlled via Profiles and Permission Sets within the org.Configure CrewAI Helm Values
Add your Salesforce credentials to your CrewAI Helm values:Activate the Integration
After deploying your updated Helm values, sync integrations to make them available to users — see Activate Integrations After Deployment.Available Actions
The Salesforce integration provides 36 actions across 9 object types:
All list actions support SOQL filters, field selection, and pagination control via
batch_size (200–2000).
Related Guides
- Google Workspace Integrations - Gmail, Calendar, Drive, Sheets, Slides, Docs, Contacts
- Microsoft 365 Integrations - Outlook, OneDrive, Teams, SharePoint, Excel, Word
- HubSpot Integration - Contacts, companies, deals, tickets, products
- Notion Integration - Workspaces, databases, pages, and comments
