salesforce-automation
npx machina-cli add skill davepoon/buildwithclaude/salesforce-automation --openclawSalesforce Automation via Rube MCP
Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.
Toolkit docs: composio.dev/toolkits/salesforce
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Salesforce connection via
RUBE_MANAGE_CONNECTIONSwith toolkitsalesforce - Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLSresponds - Call
RUBE_MANAGE_CONNECTIONSwith toolkitsalesforce - If connection is not ACTIVE, follow the returned auth link to complete Salesforce OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Manage Leads
When to use: User wants to create, search, update, or list leads
Tool sequence:
SALESFORCE_SEARCH_LEADS- Search leads by criteria [Optional]SALESFORCE_LIST_LEADS- List all leads [Optional]SALESFORCE_CREATE_LEAD- Create a new lead [Optional]SALESFORCE_UPDATE_LEAD- Update lead fields [Optional]SALESFORCE_ADD_LEAD_TO_CAMPAIGN- Add lead to campaign [Optional]SALESFORCE_APPLY_LEAD_ASSIGNMENT_RULES- Apply assignment rules [Optional]
Key parameters:
LastName: Required for lead creationCompany: Required for lead creationEmail,Phone,Title: Common lead fieldslead_id: Lead ID for updatescampaign_id: Campaign ID for campaign operations
Pitfalls:
- LastName and Company are required fields for lead creation
- Lead IDs are 15 or 18 character Salesforce IDs
2. Manage Contacts and Accounts
When to use: User wants to manage contacts and their associated accounts
Tool sequence:
SALESFORCE_SEARCH_CONTACTS- Search contacts [Optional]SALESFORCE_LIST_CONTACTS- List contacts [Optional]SALESFORCE_CREATE_CONTACT- Create a new contact [Optional]SALESFORCE_SEARCH_ACCOUNTS- Search accounts [Optional]SALESFORCE_CREATE_ACCOUNT- Create a new account [Optional]SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT- Link contact to account [Optional]
Key parameters:
LastName: Required for contact creationName: Account name for creationAccountId: Account ID to associate with contactcontact_id,account_id: IDs for association
Pitfalls:
- Contact requires at least LastName
- Account association requires both valid contact and account IDs
3. Manage Opportunities
When to use: User wants to track and manage sales opportunities
Tool sequence:
SALESFORCE_SEARCH_OPPORTUNITIES- Search opportunities [Optional]SALESFORCE_LIST_OPPORTUNITIES- List all opportunities [Optional]SALESFORCE_GET_OPPORTUNITY- Get opportunity details [Optional]SALESFORCE_CREATE_OPPORTUNITY- Create new opportunity [Optional]SALESFORCE_RETRIEVE_OPPORTUNITIES_DATA- Retrieve opportunity data [Optional]
Key parameters:
Name: Opportunity name (required)StageName: Sales stage (required)CloseDate: Expected close date (required)Amount: Deal valueAccountId: Associated account
Pitfalls:
- Name, StageName, and CloseDate are required for creation
- Stage names must match exactly what is configured in Salesforce
4. Run SOQL Queries
When to use: User wants to query Salesforce data with custom SOQL
Tool sequence:
SALESFORCE_RUN_SOQL_QUERY/SALESFORCE_QUERY- Execute SOQL [Required]
Key parameters:
query: SOQL query string
Pitfalls:
- SOQL syntax differs from SQL; uses Salesforce object and field API names
- Field API names may differ from display labels (e.g.,
Account.NamenotAccount Name) - Results are paginated for large datasets
5. Manage Tasks
When to use: User wants to create, search, update, or complete tasks
Tool sequence:
SALESFORCE_SEARCH_TASKS- Search tasks [Optional]SALESFORCE_UPDATE_TASK- Update task fields [Optional]SALESFORCE_COMPLETE_TASK- Mark task as complete [Optional]
Key parameters:
task_id: Task ID for updatesStatus: Task status valueSubject: Task subject
Pitfalls:
- Task status values must match picklist options in Salesforce
Common Patterns
SOQL Syntax
Basic query:
SELECT Id, Name, Email FROM Contact WHERE LastName = 'Smith'
With relationships:
SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Technology'
Date filtering:
SELECT Id, Name FROM Lead WHERE CreatedDate = TODAY
SELECT Id, Name FROM Opportunity WHERE CloseDate = NEXT_MONTH
Pagination
- SOQL queries with large results return pagination tokens
- Use
SALESFORCE_QUERYwith nextRecordsUrl for pagination - Check
donefield in response; if false, continue paging
Known Pitfalls
Field API Names:
- Always use API names, not display labels
- Custom fields end with
__csuffix - Use SALESFORCE_GET_ALL_CUSTOM_OBJECTS to discover custom objects
ID Formats:
- Salesforce IDs are 15 (case-sensitive) or 18 (case-insensitive) characters
- Both formats are accepted in most operations
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Create lead | SALESFORCE_CREATE_LEAD | LastName, Company |
| Search leads | SALESFORCE_SEARCH_LEADS | query |
| List leads | SALESFORCE_LIST_LEADS | (filters) |
| Update lead | SALESFORCE_UPDATE_LEAD | lead_id, fields |
| Create contact | SALESFORCE_CREATE_CONTACT | LastName |
| Search contacts | SALESFORCE_SEARCH_CONTACTS | query |
| Create account | SALESFORCE_CREATE_ACCOUNT | Name |
| Search accounts | SALESFORCE_SEARCH_ACCOUNTS | query |
| Link contact | SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT | contact_id, account_id |
| Create opportunity | SALESFORCE_CREATE_OPPORTUNITY | Name, StageName, CloseDate |
| Get opportunity | SALESFORCE_GET_OPPORTUNITY | opportunity_id |
| Search opportunities | SALESFORCE_SEARCH_OPPORTUNITIES | query |
| Run SOQL | SALESFORCE_RUN_SOQL_QUERY | query |
| Query | SALESFORCE_QUERY | query |
| Search tasks | SALESFORCE_SEARCH_TASKS | query |
| Update task | SALESFORCE_UPDATE_TASK | task_id, fields |
| Complete task | SALESFORCE_COMPLETE_TASK | task_id |
| Get user info | SALESFORCE_GET_USER_INFO | (none) |
| Custom objects | SALESFORCE_GET_ALL_CUSTOM_OBJECTS | (none) |
| Create record | SALESFORCE_CREATE_A_RECORD | object_type, fields |
| Transfer ownership | SALESFORCE_MASS_TRANSFER_OWNERSHIP | records, new_owner |
Powered by Composio
Source
git clone https://github.com/davepoon/buildwithclaude/blob/main/plugins/all-skills/skills/salesforce-automation/SKILL.mdView on GitHub Overview
Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP. This skill supports leads, contacts, accounts, opportunities, and SOQL queries, helping you streamline data management and accelerate sales processes.
How This Skill Works
Connect Rube MCP to Salesforce and always call RUBE_SEARCH_TOOLS first to fetch current tool schemas. Then use the Salesforce toolkit workflows (Manage Leads, Contacts/Accounts, Opportunities, and SOQL) via the Rube MCP platform, ensuring an ACTIVE connection before running any automations.
When to Use It
- Create, search, update, or list leads
- Manage contacts and link them to accounts
- Create, track, or retrieve opportunities
- Run custom SOQL queries against Salesforce data
- Validate and refresh the Salesforce connection and tool schemas before workflows
Quick Start
- Step 1: Verify Rube MCP is available by checking RUBE_SEARCH_TOOLS
- Step 2: Manage Salesforce connection with RUBE_MANAGE_CONNECTIONS and complete OAuth if needed
- Step 3: Run a core workflow (Leads, Contacts/Accounts, Opportunities, or SOQL) once the connection is ACTIVE
Best Practices
- Always call RUBE_SEARCH_TOOLS first to fetch current schemas
- Verify required fields (LastName and Company for leads; LastName for contacts) before creation
- Use IDs (lead_id, contact_id, account_id) for updates or associations
- Ensure the Salesforce connection status is ACTIVE before running workflows
- Match StageName and CloseDate formats exactly per Salesforce
Example Use Cases
- Create a new Lead and add to a campaign
- Create a Contact and associate it with an Account
- Create an Opportunity linked to an Account and set StageName and CloseDate
- Run a SOQL query to fetch Opportunities closing this quarter
- List and review Leads for a specific Campaign
Frequently Asked Questions
Related Skills
close-automation
davepoon/buildwithclaude
Automate Close CRM tasks via Rube MCP (Composio): create leads, manage calls/SMS, handle tasks, and track notes. Always search tools first for current schemas.
Attio Automation
ComposioHQ/awesome-claude-skills
Automate Attio CRM operations -- search records, query contacts and companies with advanced filters, manage notes, list attributes, and navigate your relationship data -- using natural language through the Composio MCP integration.
hubspot-automation
davepoon/buildwithclaude
Automate HubSpot CRM operations (contacts, companies, deals, tickets, properties) via Rube MCP using Composio integration.
pipedrive-automation
davepoon/buildwithclaude
Automate Pipedrive CRM operations including deals, contacts, organizations, activities, notes, and pipeline management via Rube MCP (Composio). Always search tools first for current schemas.
zoho-crm-automation
davepoon/buildwithclaude
Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.
Capsule CRM Automation
ComposioHQ/awesome-claude-skills
Automate Capsule CRM operations -- manage contacts (parties), run structured filter queries, track tasks and projects, log entries, and handle organizations -- using natural language through the Composio MCP integration.