Automate Salesforce tasks via Rube MCP (Composio): leads, contacts, accounts, opportunities, SOQL queries. Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/salesforce-automationComprehensive Salesforce automation with clear workflows, tool sequences, and SOQL examples
1---2name: salesforce-automation3description: "Automate Salesforce tasks via Rube MCP (Composio): leads, contacts, accounts, opportunities, SOQL queries. Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# Salesforce Automation via Rube MCP910Automate Salesforce CRM operations through Composio's Salesforce toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active Salesforce connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1718## Setup1920**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.2122231. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds242. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `salesforce`253. If connection is not ACTIVE, follow the returned auth link to complete Salesforce OAuth264. Confirm connection status shows ACTIVE before running any workflows2728## Core Workflows2930### 1. Manage Leads3132**When to use**: User wants to create, search, update, or list leads3334**Tool sequence**:351. `SALESFORCE_SEARCH_LEADS` - Search leads by criteria [Optional]362. `SALESFORCE_LIST_LEADS` - List all leads [Optional]373. `SALESFORCE_CREATE_LEAD` - Create a new lead [Optional]384. `SALESFORCE_UPDATE_LEAD` - Update lead fields [Optional]395. `SALESFORCE_ADD_LEAD_TO_CAMPAIGN` - Add lead to campaign [Optional]406. `SALESFORCE_APPLY_LEAD_ASSIGNMENT_RULES` - Apply assignment rules [Optional]4142**Key parameters**:43- `LastName`: Required for lead creation44- `Company`: Required for lead creation45- `Email`, `Phone`, `Title`: Common lead fields46- `lead_id`: Lead ID for updates47- `campaign_id`: Campaign ID for campaign operations4849**Pitfalls**:50- LastName and Company are required fields for lead creation51- Lead IDs are 15 or 18 character Salesforce IDs5253### 2. Manage Contacts and Accounts5455**When to use**: User wants to manage contacts and their associated accounts5657**Tool sequence**:581. `SALESFORCE_SEARCH_CONTACTS` - Search contacts [Optional]592. `SALESFORCE_LIST_CONTACTS` - List contacts [Optional]603. `SALESFORCE_CREATE_CONTACT` - Create a new contact [Optional]614. `SALESFORCE_SEARCH_ACCOUNTS` - Search accounts [Optional]625. `SALESFORCE_CREATE_ACCOUNT` - Create a new account [Optional]636. `SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT` - Link contact to account [Optional]6465**Key parameters**:66- `LastName`: Required for contact creation67- `Name`: Account name for creation68- `AccountId`: Account ID to associate with contact69- `contact_id`, `account_id`: IDs for association7071**Pitfalls**:72- Contact requires at least LastName73- Account association requires both valid contact and account IDs7475### 3. Manage Opportunities7677**When to use**: User wants to track and manage sales opportunities7879**Tool sequence**:801. `SALESFORCE_SEARCH_OPPORTUNITIES` - Search opportunities [Optional]812. `SALESFORCE_LIST_OPPORTUNITIES` - List all opportunities [Optional]823. `SALESFORCE_GET_OPPORTUNITY` - Get opportunity details [Optional]834. `SALESFORCE_CREATE_OPPORTUNITY` - Create new opportunity [Optional]845. `SALESFORCE_RETRIEVE_OPPORTUNITIES_DATA` - Retrieve opportunity data [Optional]8586**Key parameters**:87- `Name`: Opportunity name (required)88- `StageName`: Sales stage (required)89- `CloseDate`: Expected close date (required)90- `Amount`: Deal value91- `AccountId`: Associated account9293**Pitfalls**:94- Name, StageName, and CloseDate are required for creation95- Stage names must match exactly what is configured in Salesforce9697### 4. Run SOQL Queries9899**When to use**: User wants to query Salesforce data with custom SOQL100101**Tool sequence**:1021. `SALESFORCE_RUN_SOQL_QUERY` / `SALESFORCE_QUERY` - Execute SOQL [Required]103104**Key parameters**:105- `query`: SOQL query string106107**Pitfalls**:108- SOQL syntax differs from SQL; uses Salesforce object and field API names109- Field API names may differ from display labels (e.g., `Account.Name` not `Account Name`)110- Results are paginated for large datasets111112### 5. Manage Tasks113114**When to use**: User wants to create, search, update, or complete tasks115116**Tool sequence**:1171. `SALESFORCE_SEARCH_TASKS` - Search tasks [Optional]1182. `SALESFORCE_UPDATE_TASK` - Update task fields [Optional]1193. `SALESFORCE_COMPLETE_TASK` - Mark task as complete [Optional]120121**Key parameters**:122- `task_id`: Task ID for updates123- `Status`: Task status value124- `Subject`: Task subject125126**Pitfalls**:127- Task status values must match picklist options in Salesforce128129## Common Patterns130131### SOQL Syntax132133**Basic query**:134```135SELECT Id, Name, Email FROM Contact WHERE LastName = 'Smith'136```137138**With relationships**:139```140SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Technology'141```142143**Date filtering**:144```145SELECT Id, Name FROM Lead WHERE CreatedDate = TODAY146SELECT Id, Name FROM Opportunity WHERE CloseDate = NEXT_MONTH147```148149### Pagination150151- SOQL queries with large results return pagination tokens152- Use `SALESFORCE_QUERY` with nextRecordsUrl for pagination153- Check `done` field in response; if false, continue paging154155## Known Pitfalls156157**Field API Names**:158- Always use API names, not display labels159- Custom fields end with `__c` suffix160- Use SALESFORCE_GET_ALL_CUSTOM_OBJECTS to discover custom objects161162**ID Formats**:163- Salesforce IDs are 15 (case-sensitive) or 18 (case-insensitive) characters164- Both formats are accepted in most operations165166## Quick Reference167168| Task | Tool Slug | Key Params |169|------|-----------|------------|170| Create lead | SALESFORCE_CREATE_LEAD | LastName, Company |171| Search leads | SALESFORCE_SEARCH_LEADS | query |172| List leads | SALESFORCE_LIST_LEADS | (filters) |173| Update lead | SALESFORCE_UPDATE_LEAD | lead_id, fields |174| Create contact | SALESFORCE_CREATE_CONTACT | LastName |175| Search contacts | SALESFORCE_SEARCH_CONTACTS | query |176| Create account | SALESFORCE_CREATE_ACCOUNT | Name |177| Search accounts | SALESFORCE_SEARCH_ACCOUNTS | query |178| Link contact | SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT | contact_id, account_id |179| Create opportunity | SALESFORCE_CREATE_OPPORTUNITY | Name, StageName, CloseDate |180| Get opportunity | SALESFORCE_GET_OPPORTUNITY | opportunity_id |181| Search opportunities | SALESFORCE_SEARCH_OPPORTUNITIES | query |182| Run SOQL | SALESFORCE_RUN_SOQL_QUERY | query |183| Query | SALESFORCE_QUERY | query |184| Search tasks | SALESFORCE_SEARCH_TASKS | query |185| Update task | SALESFORCE_UPDATE_TASK | task_id, fields |186| Complete task | SALESFORCE_COMPLETE_TASK | task_id |187| Get user info | SALESFORCE_GET_USER_INFO | (none) |188| Custom objects | SALESFORCE_GET_ALL_CUSTOM_OBJECTS | (none) |189| Create record | SALESFORCE_CREATE_A_RECORD | object_type, fields |190| Transfer ownership | SALESFORCE_MASS_TRANSFER_OWNERSHIP | records, new_owner |191
Full transparency — inspect the skill content before installing.