Antigravity-awesome-skills salesforce-automation
Automate Salesforce tasks via Rube MCP (Composio): leads, contacts, accounts, opportunities, SOQL queries. Always search tools first for current schemas.
git clone https://github.com/benjaminasterA/antigravity-awesome-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/benjaminasterA/antigravity-awesome-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/salesforce-automation" ~/.claude/skills/benjaminastera-antigravity-awesome-skills-salesforce-automation && rm -rf "$T"
skills/salesforce-automation/SKILL.mdSalesforce 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
with toolkitRUBE_MANAGE_CONNECTIONSsalesforce - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
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
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONSsalesforce - 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:
- Search leads by criteria [Optional]SALESFORCE_SEARCH_LEADS
- List all leads [Optional]SALESFORCE_LIST_LEADS
- Create a new lead [Optional]SALESFORCE_CREATE_LEAD
- Update lead fields [Optional]SALESFORCE_UPDATE_LEAD
- Add lead to campaign [Optional]SALESFORCE_ADD_LEAD_TO_CAMPAIGN
- Apply assignment rules [Optional]SALESFORCE_APPLY_LEAD_ASSIGNMENT_RULES
Key parameters:
: Required for lead creationLastName
: Required for lead creationCompany
,Email
,Phone
: Common lead fieldsTitle
: Lead ID for updateslead_id
: Campaign ID for campaign operationscampaign_id
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:
- Search contacts [Optional]SALESFORCE_SEARCH_CONTACTS
- List contacts [Optional]SALESFORCE_LIST_CONTACTS
- Create a new contact [Optional]SALESFORCE_CREATE_CONTACT
- Search accounts [Optional]SALESFORCE_SEARCH_ACCOUNTS
- Create a new account [Optional]SALESFORCE_CREATE_ACCOUNT
- Link contact to account [Optional]SALESFORCE_ASSOCIATE_CONTACT_TO_ACCOUNT
Key parameters:
: Required for contact creationLastName
: Account name for creationName
: Account ID to associate with contactAccountId
,contact_id
: IDs for associationaccount_id
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:
- Search opportunities [Optional]SALESFORCE_SEARCH_OPPORTUNITIES
- List all opportunities [Optional]SALESFORCE_LIST_OPPORTUNITIES
- Get opportunity details [Optional]SALESFORCE_GET_OPPORTUNITY
- Create new opportunity [Optional]SALESFORCE_CREATE_OPPORTUNITY
- Retrieve opportunity data [Optional]SALESFORCE_RETRIEVE_OPPORTUNITIES_DATA
Key parameters:
: Opportunity name (required)Name
: Sales stage (required)StageName
: Expected close date (required)CloseDate
: Deal valueAmount
: Associated accountAccountId
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
- Execute SOQL [Required]SALESFORCE_QUERY
Key parameters:
: SOQL query stringquery
Pitfalls:
- SOQL syntax differs from SQL; uses Salesforce object and field API names
- Field API names may differ from display labels (e.g.,
notAccount.Name
)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:
- Search tasks [Optional]SALESFORCE_SEARCH_TASKS
- Update task fields [Optional]SALESFORCE_UPDATE_TASK
- Mark task as complete [Optional]SALESFORCE_COMPLETE_TASK
Key parameters:
: Task ID for updatestask_id
: Task status valueStatus
: Task subjectSubject
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
with nextRecordsUrl for paginationSALESFORCE_QUERY - Check
field in response; if false, continue pagingdone
Known Pitfalls
Field API Names:
- Always use API names, not display labels
- Custom fields end with
suffix__c - 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.