Install
openclaw skills install salesforce-easyComplete Salesforce CRM integration for real-time data access, lead management, opportunity tracking, duplicate detection, and bulk operations. One-click OAuth connection with fast, reliable API access.
openclaw skills install salesforce-easyThe fastest, most reliable way to work with Salesforce data in OpenClaw.
This skill provides complete Salesforce CRM integration with one-click OAuth authentication, real-time data access, intelligent duplicate detection, bulk operations, and comprehensive SOQL query support. Built for SDRs, sales teams, and anyone who needs instant access to their Salesforce data without the usual friction.
Use this skill when the user wants to:
Common user requests:
Step 1: Install Dependencies
pip install -r requirements.txt
Security note: Always install from
requirements.txt— versions are pinned to reviewed releases.
Step 2: Authenticate with Salesforce
The skill will guide you through OAuth authentication:
Alternative: Use Existing Credentials
If you already have Salesforce credentials:
Option A — Salesforce Platform CLI (easiest, no secrets needed):
# 1. Install CLI (one time)
npm install -g @salesforce/cli
# 2. Login via browser (one time)
sf org login web --alias myorg
# 3. Extract token into skill
python scripts/oauth.py platform --alias myorg
Option B — Connected App OAuth 2.0 flow:
# Generate auth URL, authorize in browser, then exchange code
python scripts/connect.py oauth <client_id>
python scripts/oauth.py exchange
# Env vars needed: SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_OAUTH_CODE
Option C — Username + security token (.env):
# .env file (never commit to source control)
SALESFORCE_USERNAME=your@email.com
SALESFORCE_PASSWORD=<password>
SALESFORCE_SECURITY_TOKEN=<security-token>
Use a dedicated least-privilege integration user, not an admin account.
Once connected, just ask in natural language:
Query Examples:
Create Examples:
Update Examples:
Duplicate Detection:
Bulk Operations:
User: "Show me unqualified leads from this week"
→ Skill queries leads with Status='Unqualified' and CreatedDate=THIS_WEEK
→ Returns list with key fields (Name, Email, Company, Phone)
User: "Update the first one to Qualified"
→ Skill updates lead status
→ Confirms update with record details
User: "Find duplicate contacts"
→ Skill scans contacts for duplicate emails
→ Returns grouped duplicates with record IDs
User: "Merge the first group, keep the newest"
→ Skill merges records, preserving newest data
→ Confirms merge and shows final record
User: "Show me opportunities closing this month"
→ Skill queries opportunities with CloseDate=THIS_MONTH
→ Returns sorted by CloseDate
User: "What's the total value?"
→ Skill calculates SUM(Amount)
→ Returns total pipeline value
User: "Create leads from this CSV: [uploads file]"
→ Skill parses CSV
→ Validates required fields
→ Checks for duplicates
→ Creates leads in batches of 200
→ Returns success count and any errors
User: "Get all contacts at Acme Corp"
→ Skill finds Account named "Acme Corp"
→ Queries related Contacts
→ Returns contact list with roles
User: "Show me their open opportunities"
→ Skill queries opportunities for that account
→ Returns opportunity details
-- Simple query
SELECT Name, Email FROM Lead WHERE Status = 'Open'
-- With relationships
SELECT Name, Account.Name FROM Contact WHERE Account.Industry = 'Technology'
-- Aggregates
SELECT COUNT(Id), SUM(Amount) FROM Opportunity WHERE StageName = 'Closed Won'
-- Date filters
SELECT Name FROM Lead WHERE CreatedDate = THIS_WEEK
-- Sorting and limits
SELECT Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 10
-- Search across objects
FIND {john@example.com} IN EMAIL FIELDS RETURNING Lead, Contact
-- Search with filters
FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry WHERE Industry = 'Technology')
Salesforce enforces API rate limits based on your org's license:
This skill handles rate limits automatically:
Problem: "Authentication failed" Solution:
Problem: "Invalid session ID" Solution: Token expired - re-authenticate
Problem: "Invalid SOQL query" Solution:
Problem: "No results found" Solution:
Problem: "Query timeout" Solution:
Problem: "Too many duplicates found" Solution:
User: "Run this SOQL: SELECT Name, Email FROM Lead WHERE Company LIKE '%Tech%' ORDER BY CreatedDate DESC LIMIT 50"
→ Skill executes custom query
→ Returns results in table format
User: "Get all contacts at accounts in California with their opportunities"
→ Skill builds complex relationship query
→ Returns nested data structure
User: "Create 5000 leads from this file"
→ Skill uses Bulk API (not REST API)
→ Processes in background
→ Provides job ID for tracking
→ Notifies when complete
User: "Show me all fields for this lead"
→ Skill respects field-level security
→ Only shows fields user has access to
→ Indicates restricted fields
User: "Create a lead with record type 'Enterprise'"
→ Skill looks up record type ID
→ Creates lead with correct record type
→ Validates required fields for that type
Based on testing with real Salesforce orgs:
Created by: Sawera Khadium
License: MIT
Issues: Report bugs or request features via GitHub issues
Documentation: Full API reference in /references/salesforce-api.md
# Install via ClawHub
clawhub install sawera-khadium/salesforce-crm
# Or manually
cd ~/.openclaw/skills/
git clone https://github.com/sawera-khadium/salesforce-crm-skill.git salesforce-crm
cd salesforce-crm
pip install -r requirements.txt
# 1. Install pinned dependencies
pip install -r requirements.txt
# 2. Configure credentials in .env (never export raw secrets in shell)
# Copy .env.example to .env and fill in your values — see README for details.
# 3. Start using!
# Say: "Show me all leads from this week"
When the user requests Salesforce operations, follow this workflow:
Identify the operation type:
From user message, extract:
/scripts/Before deleting or bulk updating:
Example 1: Simple Query
User: "Show me leads from this week"
Agent: I'll query leads created this week from Salesforce.
[Executes: SELECT Id, Name, Email, Company, Status FROM Lead WHERE CreatedDate = THIS_WEEK]
Found 23 leads created this week:
| Name | Email | Company | Status |
|------|-------|---------|--------|
| John Smith | john@acme.com | Acme Corp | Open |
| Sarah Johnson | sarah@techco.com | TechCo | Qualified |
| ... (21 more) |
Would you like to see more details or filter these results?
Example 2: Duplicate Detection
User: "Find duplicate contacts"
Agent: I'll scan for duplicate contacts based on email addresses.
[Executes duplicate detection script]
Found 12 duplicate groups (28 total duplicate contacts):
Group 1: john@example.com
- Contact ID: 003xx000001234AAA (Created: 2026-01-15)
- Contact ID: 003xx000005678BBB (Created: 2026-03-20)
Group 2: sarah@company.com
- Contact ID: 003xx000009012CCC (Created: 2025-12-10)
- Contact ID: 003xx000003456DDD (Created: 2026-02-05)
... (10 more groups)
Would you like me to merge any of these duplicates?
Example 3: Bulk Create
User: "Create these 5 leads: [provides list]"
Agent: I'll create 5 new leads in Salesforce. Let me check for duplicates first.
[Checks for existing leads with same emails]
No duplicates found. Creating 5 leads...
[Executes bulk create]
✓ Successfully created 5 leads:
- John Smith (Lead ID: 00Qxx000001234AAA)
- Sarah Johnson (Lead ID: 00Qxx000005678BBB)
- Mike Davis (Lead ID: 00Qxx000009012CCC)
- Emily Chen (Lead ID: 00Qxx000003456DDD)
- David Wilson (Lead ID: 00Qxx000007890EEE)
All leads have been assigned to you and set to "Open" status.
Example 4: Update with Confirmation
User: "Update all leads from California to 'West Region'"
Agent: This will update the Region field for all leads in California. Let me check how many records will be affected.
[Queries: SELECT COUNT() FROM Lead WHERE State = 'CA']
This will update 47 leads. Do you want to proceed? (yes/no)
User: "yes"
Agent: Updating 47 leads...
[Executes bulk update]
✓ Successfully updated 47 leads to Region = 'West Region'
Summary:
- Records updated: 47
- Time taken: 2.3 seconds
- API calls used: 1
This skill is production-ready and follows all ClawHub best practices for security, performance, and user experience.