SKILL.md
Salesforce Automation via Rube MCP
Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBESEARCHTOOLS available)
- Active Salesforce connection via
RUBEMANAGECONNECTIONSwith toolkitsalesforce - Always call
RUBESEARCHTOOLSfirst 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
RUBESEARCHTOOLSresponds - Call
RUBEMANAGECONNECTIONSwith 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:
SALESFORCESEARCHLEADS- Search leads by criteria [Optional]SALESFORCELISTLEADS- List all leads [Optional]SALESFORCECREATELEAD- Create a new lead [Optional]SALESFORCEUPDATELEAD- Update lead fields [Optional]SALESFORCEADDLEADTOCAMPAIGN- Add lead to campaign [Optional]SALESFORCEAPPLYLEADASSIGNMENTRULES- 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:
SALESFORCESEARCHCONTACTS- Search contacts [Optional]SALESFORCELISTCONTACTS- List contacts [Optional]SALESFORCECREATECONTACT- Create a new contact [Optional]SALESFORCESEARCHACCOUNTS- Search accounts [Optional]SALESFORCECREATEACCOUNT- Create a new account [Optional]SALESFORCEASSOCIATECONTACTTOACCOUNT- Link contact to account [Optional]
Key parameters:
LastName: Required for contact creationName: Account name for creationAccountId: Account ID to associate with contactcontactid,accountid: 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:
SALESFORCESEARCHOPPORTUNITIES- Search opportunities [Optional]SALESFORCELISTOPPORTUNITIES- List all opportunities [Optional]SALESFORCEGETOPPORTUNITY- Get opportunity details [Optional]SALESFORCECREATEOPPORTUNITY- Create new opportunity [Optional]SALESFORCERETRIEVEOPPORTUNITIES_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:
SALESFORCERUNSOQLQUERY/SALESFORCEQUERY- 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:
SALESFORCESEARCHTASKS- Search tasks [Optional]SALESFORCEUPDATETASK- Update task fields [Optional]SALESFORCECOMPLETETASK- 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 SALESFORCEGETALLCUSTOMOBJECTS 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 | SALESFORCECREATELEAD | LastName, Company |
| Search leads | SALESFORCESEARCHLEADS | query |
| List leads | SALESFORCELISTLEADS | (filters) |
| Update lead | SALESFORCEUPDATELEAD | lead_id, fields |
| Create contact | SALESFORCECREATECONTACT | LastName |
| Search contacts | SALESFORCESEARCHCONTACTS | query |
| Create account | SALESFORCECREATEACCOUNT | Name |
| Search accounts | SALESFORCESEARCHACCOUNTS | query |
| Link contact | SALESFORCEASSOCIATECONTACTTOACCOUNT | contactid, accountid |
| Create opportunity | SALESFORCECREATEOPPORTUNITY | Name, StageName, CloseDate |
| Get opportunity | SALESFORCEGETOPPORTUNITY | opportunity_id |
| Search opportunities | SALESFORCESEARCHOPPORTUNITIES | query |
| Run SOQL | SALESFORCERUNSOQL_QUERY | query |
| Query | SALESFORCE_QUERY | query |
| Search tasks | SALESFORCESEARCHTASKS | query |
| Update task | SALESFORCEUPDATETASK | task_id, fields |
| Complete task | SALESFORCECOMPLETETASK | task_id |
| Get user info | SALESFORCEGETUSER_INFO | (none) |
| Custom objects | SALESFORCEGETALLCUSTOMOBJECTS | (none) |
| Create record | SALESFORCECREATEA_RECORD | object_type, fields |
| Transfer ownership | SALESFORCEMASSTRANSFER_OWNERSHIP | records, new_owner |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.