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.4---5
6# Salesforce Automation via Rube MCP
7
8Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.
9
10## Prerequisites
11
12- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
13- Active Salesforce connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`
14- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas
15
16## Setup
17
18**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.
19
20
211. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds
222. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`
233. If connection is not ACTIVE, follow the returned auth link to complete Salesforce OAuth
244. Confirm connection status shows ACTIVE before running any workflows
25
26## Core Workflows
27
28### 1. Manage Leads
29
30**When to use**: User wants to create, search, update, or list leads
31
32**Tool sequence**:
331. `SALESFORCE_SEARCH_LEADS` - Search leads by criteria [Optional]
342. `SALESFORCE_LIST_LEADS` - List all leads [Optional]
353. `SALESFORCE_CREATE_LEAD` - Create a new lead [Optional]
364. `SALESFORCE_UPDATE_LEAD` - Update lead fields [Optional]
375. `SALESFORCE_ADD_LEAD_TO_CAMPAIGN` - Add lead to campaign [Optional]
386. `SALESFORCE_APPLY_LEAD_ASSIGNMENT_RULES` - Apply assignment rules [Optional]
39
40**Key parameters**:
41- `LastName`: Required for lead creation
42- `Company`: Required for lead creation
43- `Email`, `Phone`, `Title`: Common lead fields
44- `lead_id`: Lead ID for updates
45- `campaign_id`: Campaign ID for campaign operations
46
47**Pitfalls**:
48- LastName and Company are required fields for lead creation
49- Lead IDs are 15 or 18 character Salesforce IDs
50
51### 2. Manage Contacts and Accounts
52
53**When to use**: User wants to manage contacts and their associated accounts
54
55**Tool sequence**:
561. `SALESFORCE_SEARCH_CONTACTS` - Search contacts [Optional]
572. `SALESFORCE_LIST_CONTACTS` - List contacts [Optional]
583. `SALESFORCE_CREATE_CONTACT` - Create a new contact [Optional]
594. `SALESFORCE_SEARCH_ACCOUNTS` - Search accounts [Optional]
605. `SALESFORCE_CREATE_ACCOUNT` - Create a new account [Optional]
616. `SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT` - Link contact to account [Optional]
62
63**Key parameters**:
64- `LastName`: Required for contact creation
65- `Name`: Account name for creation
66- `AccountId`: Account ID to associate with contact
67- `contact_id`, `account_id`: IDs for association
68
69**Pitfalls**:
70- Contact requires at least LastName
71- Account association requires both valid contact and account IDs
72
73### 3. Manage Opportunities
74
75**When to use**: User wants to track and manage sales opportunities
76
77**Tool sequence**:
781. `SALESFORCE_SEARCH_OPPORTUNITIES` - Search opportunities [Optional]
792. `SALESFORCE_LIST_OPPORTUNITIES` - List all opportunities [Optional]
803. `SALESFORCE_GET_OPPORTUNITY` - Get opportunity details [Optional]
814. `SALESFORCE_CREATE_OPPORTUNITY` - Create new opportunity [Optional]
825. `SALESFORCE_RETRIEVE_OPPORTUNITIES_DATA` - Retrieve opportunity data [Optional]
83
84**Key parameters**:
85- `Name`: Opportunity name (required)
86- `StageName`: Sales stage (required)
87- `CloseDate`: Expected close date (required)
88- `Amount`: Deal value
89- `AccountId`: Associated account
90
91**Pitfalls**:
92- Name, StageName, and CloseDate are required for creation
93- Stage names must match exactly what is configured in Salesforce
94
95### 4. Run SOQL Queries
96
97**When to use**: User wants to query Salesforce data with custom SOQL
98
99**Tool sequence**:
1001. `SALESFORCE_RUN_SOQL_QUERY` / `SALESFORCE_QUERY` - Execute SOQL [Required]
101
102**Key parameters**:
103- `query`: SOQL query string
104
105**Pitfalls**:
106- SOQL syntax differs from SQL; uses Salesforce object and field API names
107- Field API names may differ from display labels (e.g., `Account.Name` not `Account Name`)
108- Results are paginated for large datasets
109
110### 5. Manage Tasks
111
112**When to use**: User wants to create, search, update, or complete tasks
113
114**Tool sequence**:
1151. `SALESFORCE_SEARCH_TASKS` - Search tasks [Optional]
1162. `SALESFORCE_UPDATE_TASK` - Update task fields [Optional]
1173. `SALESFORCE_COMPLETE_TASK` - Mark task as complete [Optional]
118
119**Key parameters**:
120- `task_id`: Task ID for updates
121- `Status`: Task status value
122- `Subject`: Task subject
123
124**Pitfalls**:
125- Task status values must match picklist options in Salesforce
126
127## Common Patterns
128
129### SOQL Syntax
130
131**Basic query**:
132```
133SELECT Id, Name, Email FROM Contact WHERE LastName = 'Smith'
134```
135
136**With relationships**:
137```
138SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Technology'
139```
140
141**Date filtering**:
142```
143SELECT Id, Name FROM Lead WHERE CreatedDate = TODAY
144SELECT Id, Name FROM Opportunity WHERE CloseDate = NEXT_MONTH
145```
146
147### Pagination
148
149- SOQL queries with large results return pagination tokens
150- Use `SALESFORCE_QUERY` with nextRecordsUrl for pagination
151- Check `done` field in response; if false, continue paging
152
153## Known Pitfalls
154
155**Field API Names**:
156- Always use API names, not display labels
157- Custom fields end with `__c` suffix
158- Use SALESFORCE_GET_ALL_CUSTOM_OBJECTS to discover custom objects
159
160**ID Formats**:
161- Salesforce IDs are 15 (case-sensitive) or 18 (case-insensitive) characters
162- Both formats are accepted in most operations
163
164## Quick Reference
165
166| Task | Tool Slug | Key Params |
167|------|-----------|------------|
168| Create lead | SALESFORCE_CREATE_LEAD | LastName, Company |
169| Search leads | SALESFORCE_SEARCH_LEADS | query |
170| List leads | SALESFORCE_LIST_LEADS | (filters) |
171| Update lead | SALESFORCE_UPDATE_LEAD | lead_id, fields |
172| Create contact | SALESFORCE_CREATE_CONTACT | LastName |
173| Search contacts | SALESFORCE_SEARCH_CONTACTS | query |
174| Create account | SALESFORCE_CREATE_ACCOUNT | Name |
175| Search accounts | SALESFORCE_SEARCH_ACCOUNTS | query |
176| Link contact | SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT | contact_id, account_id |
177| Create opportunity | SALESFORCE_CREATE_OPPORTUNITY | Name, StageName, CloseDate |
178| Get opportunity | SALESFORCE_GET_OPPORTUNITY | opportunity_id |
179| Search opportunities | SALESFORCE_SEARCH_OPPORTUNITIES | query |
180| Run SOQL | SALESFORCE_RUN_SOQL_QUERY | query |
181| Query | SALESFORCE_QUERY | query |
182| Search tasks | SALESFORCE_SEARCH_TASKS | query |
183| Update task | SALESFORCE_UPDATE_TASK | task_id, fields |
184| Complete task | SALESFORCE_COMPLETE_TASK | task_id |
185| Get user info | SALESFORCE_GET_USER_INFO | (none) |
186| Custom objects | SALESFORCE_GET_ALL_CUSTOM_OBJECTS | (none) |
187| Create record | SALESFORCE_CREATE_A_RECORD | object_type, fields |
188| Transfer ownership | SALESFORCE_MASS_TRANSFER_OWNERSHIP | records, new_owner |
189
190## When to Use
191This skill is applicable to execute the workflow or actions described in the overview.
192
193## Limitations
194- Use this skill only when the task clearly matches the scope described above.
195- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
196- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.