Salesforce Automation via Rube MCP
Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Salesforce connection via
RUBE_MANAGE_CONNECTIONS with toolkit salesforce
- Always call
RUBE_SEARCH_TOOLS first 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_TOOLS responds
- Call
RUBE_MANAGE_CONNECTIONS with toolkit salesforce
- 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 creation
Company: Required for lead creation
Email, Phone, Title: Common lead fields
lead_id: Lead ID for updates
campaign_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 creation
Name: Account name for creation
AccountId: Account ID to associate with contact
contact_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 value
AccountId: 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:
Pitfalls:
- SOQL syntax differs from SQL; uses Salesforce object and field API names
- Field API names may differ from display labels (e.g.,
Account.Name not Account 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 updates
Status: Task status value
Subject: 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_QUERY with nextRecordsUrl for pagination
- Check
done field in response; if false, continue paging
Known Pitfalls
Field API Names:
- Always use API names, not display labels
- Custom fields end with
__c suffix
- 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 |
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.
1---2name: salesforce-automation3description: Automate Salesforce tasks via Rube MCP (Composio): leads, contacts, accounts, opportunities, SOQL queries. Always search tools first for current schemas.4license: MIT5---67# Salesforce Automation via Rube MCP89Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.1011## Prerequisites1213- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)14- Active Salesforce connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`15- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1617## Setup1819**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.2021221. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds232. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`243. If connection is not ACTIVE, follow the returned auth link to complete Salesforce OAuth254. Confirm connection status shows ACTIVE before running any workflows2627## Core Workflows2829### 1. Manage Leads3031**When to use**: User wants to create, search, update, or list leads3233**Tool sequence**:341. `SALESFORCE_SEARCH_LEADS` - Search leads by criteria [Optional]352. `SALESFORCE_LIST_LEADS` - List all leads [Optional]363. `SALESFORCE_CREATE_LEAD` - Create a new lead [Optional]374. `SALESFORCE_UPDATE_LEAD` - Update lead fields [Optional]385. `SALESFORCE_ADD_LEAD_TO_CAMPAIGN` - Add lead to campaign [Optional]396. `SALESFORCE_APPLY_LEAD_ASSIGNMENT_RULES` - Apply assignment rules [Optional]4041**Key parameters**:42- `LastName`: Required for lead creation43- `Company`: Required for lead creation44- `Email`, `Phone`, `Title`: Common lead fields45- `lead_id`: Lead ID for updates46- `campaign_id`: Campaign ID for campaign operations4748**Pitfalls**:49- LastName and Company are required fields for lead creation50- Lead IDs are 15 or 18 character Salesforce IDs5152### 2. Manage Contacts and Accounts5354**When to use**: User wants to manage contacts and their associated accounts5556**Tool sequence**:571. `SALESFORCE_SEARCH_CONTACTS` - Search contacts [Optional]582. `SALESFORCE_LIST_CONTACTS` - List contacts [Optional]593. `SALESFORCE_CREATE_CONTACT` - Create a new contact [Optional]604. `SALESFORCE_SEARCH_ACCOUNTS` - Search accounts [Optional]615. `SALESFORCE_CREATE_ACCOUNT` - Create a new account [Optional]626. `SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT` - Link contact to account [Optional]6364**Key parameters**:65- `LastName`: Required for contact creation66- `Name`: Account name for creation67- `AccountId`: Account ID to associate with contact68- `contact_id`, `account_id`: IDs for association6970**Pitfalls**:71- Contact requires at least LastName72- Account association requires both valid contact and account IDs7374### 3. Manage Opportunities7576**When to use**: User wants to track and manage sales opportunities7778**Tool sequence**:791. `SALESFORCE_SEARCH_OPPORTUNITIES` - Search opportunities [Optional]802. `SALESFORCE_LIST_OPPORTUNITIES` - List all opportunities [Optional]813. `SALESFORCE_GET_OPPORTUNITY` - Get opportunity details [Optional]824. `SALESFORCE_CREATE_OPPORTUNITY` - Create new opportunity [Optional]835. `SALESFORCE_RETRIEVE_OPPORTUNITIES_DATA` - Retrieve opportunity data [Optional]8485**Key parameters**:86- `Name`: Opportunity name (required)87- `StageName`: Sales stage (required)88- `CloseDate`: Expected close date (required)89- `Amount`: Deal value90- `AccountId`: Associated account9192**Pitfalls**:93- Name, StageName, and CloseDate are required for creation94- Stage names must match exactly what is configured in Salesforce9596### 4. Run SOQL Queries9798**When to use**: User wants to query Salesforce data with custom SOQL99100**Tool sequence**:1011. `SALESFORCE_RUN_SOQL_QUERY` / `SALESFORCE_QUERY` - Execute SOQL [Required]102103**Key parameters**:104- `query`: SOQL query string105106**Pitfalls**:107- SOQL syntax differs from SQL; uses Salesforce object and field API names108- Field API names may differ from display labels (e.g., `Account.Name` not `Account Name`)109- Results are paginated for large datasets110111### 5. Manage Tasks112113**When to use**: User wants to create, search, update, or complete tasks114115**Tool sequence**:1161. `SALESFORCE_SEARCH_TASKS` - Search tasks [Optional]1172. `SALESFORCE_UPDATE_TASK` - Update task fields [Optional]1183. `SALESFORCE_COMPLETE_TASK` - Mark task as complete [Optional]119120**Key parameters**:121- `task_id`: Task ID for updates122- `Status`: Task status value123- `Subject`: Task subject124125**Pitfalls**:126- Task status values must match picklist options in Salesforce127128## Common Patterns129130### SOQL Syntax131132**Basic query**:133```134SELECT Id, Name, Email FROM Contact WHERE LastName = 'Smith'135```136137**With relationships**:138```139SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Technology'140```141142**Date filtering**:143```144SELECT Id, Name FROM Lead WHERE CreatedDate = TODAY145SELECT Id, Name FROM Opportunity WHERE CloseDate = NEXT_MONTH146```147148### Pagination149150- SOQL queries with large results return pagination tokens151- Use `SALESFORCE_QUERY` with nextRecordsUrl for pagination152- Check `done` field in response; if false, continue paging153154## Known Pitfalls155156**Field API Names**:157- Always use API names, not display labels158- Custom fields end with `__c` suffix159- Use SALESFORCE_GET_ALL_CUSTOM_OBJECTS to discover custom objects160161**ID Formats**:162- Salesforce IDs are 15 (case-sensitive) or 18 (case-insensitive) characters163- Both formats are accepted in most operations164165## Quick Reference166167| Task | Tool Slug | Key Params |168|------|-----------|------------|169| Create lead | SALESFORCE_CREATE_LEAD | LastName, Company |170| Search leads | SALESFORCE_SEARCH_LEADS | query |171| List leads | SALESFORCE_LIST_LEADS | (filters) |172| Update lead | SALESFORCE_UPDATE_LEAD | lead_id, fields |173| Create contact | SALESFORCE_CREATE_CONTACT | LastName |174| Search contacts | SALESFORCE_SEARCH_CONTACTS | query |175| Create account | SALESFORCE_CREATE_ACCOUNT | Name |176| Search accounts | SALESFORCE_SEARCH_ACCOUNTS | query |177| Link contact | SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT | contact_id, account_id |178| Create opportunity | SALESFORCE_CREATE_OPPORTUNITY | Name, StageName, CloseDate |179| Get opportunity | SALESFORCE_GET_OPPORTUNITY | opportunity_id |180| Search opportunities | SALESFORCE_SEARCH_OPPORTUNITIES | query |181| Run SOQL | SALESFORCE_RUN_SOQL_QUERY | query |182| Query | SALESFORCE_QUERY | query |183| Search tasks | SALESFORCE_SEARCH_TASKS | query |184| Update task | SALESFORCE_UPDATE_TASK | task_id, fields |185| Complete task | SALESFORCE_COMPLETE_TASK | task_id |186| Get user info | SALESFORCE_GET_USER_INFO | (none) |187| Custom objects | SALESFORCE_GET_ALL_CUSTOM_OBJECTS | (none) |188| Create record | SALESFORCE_CREATE_A_RECORD | object_type, fields |189| Transfer ownership | SALESFORCE_MASS_TRANSFER_OWNERSHIP | records, new_owner |190191## When to Use192This skill is applicable to execute the workflow or actions described in the overview.193194## Limitations195- Use this skill only when the task clearly matches the scope described above.196- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.197- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.