Salesforce Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Salesforce MCP or direct API to fetch account details, update leads, log activities, and manage opportunities through natural language.
Salesforce Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools and Triggers

Tools
Triggers
Add contact to campaignAdds a contact to a campaign by creating a campaignmember record, allowing you to track campaign engagement.
Add lead to campaignAdds a lead to a campaign by creating a campaignmember record, allowing you to track campaign engagement.
Add product to opportunityAdds a product (line item) to an opportunity.
Apply lead assignment rulesApplies configured lead assignment rules to a specific lead, automatically routing it to the appropriate owner based on your organization's rules.
Associate contact to accountAssociates a contact with an account by updating the contact's accountid field.
Clone opportunity with productsClones an opportunity and optionally its products (line items).
Clone recordCreates a copy of an existing salesforce record by reading its data, removing system fields, and creating a new record.
Complete taskMarks a task as completed with optional completion notes.
Create accountCreates a new account in salesforce with the specified information.
Create campaignCreates a new campaign in salesforce with the specified information.
Create contactCreates a new contact in salesforce with the specified information.
Create leadCreates a new lead in salesforce with the specified information.
Create noteCreates a new note attached to a salesforce record with the specified title and content.
Create opportunityCreates a new opportunity in salesforce with the specified information.
Create taskCreates a new task in salesforce to track activities, to-dos, and follow-ups related to contacts, leads, or other records.
Delete accountPermanently deletes an account from salesforce.
Delete campaignPermanently deletes a campaign from salesforce.
Delete contactPermanently deletes a contact from salesforce.
Delete leadPermanently deletes a lead from salesforce.
Delete notePermanently deletes a note from salesforce.
Delete opportunityPermanently deletes an opportunity from salesforce.
Get accountRetrieves a specific account by id from salesforce, returning all available fields.
Get campaignRetrieves a specific campaign by id from salesforce, returning all available fields.
Get contactRetrieves a specific contact by id from salesforce, returning all available fields.
Get dashboardGets detailed metadata for a specific dashboard including its components, layout, and filters.
Get leadRetrieves a specific lead by id from salesforce, returning all available fields.
Get noteRetrieves a specific note by id from salesforce, returning all available fields.
Get opportunityRetrieves a specific opportunity by id from salesforce, returning all available fields.
Get report metadataGets detailed metadata for a specific report including its structure, columns, filters, and groupings.
Get report instance resultsGets the results of a report instance created by running a report.
Get user infoRetrieves information about the current user or a specific user in salesforce.
List accountsLists accounts from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List campaignsLists campaigns from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List contactsLists contacts from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List dashboardsLists all dashboards available in salesforce with basic metadata including name, id, and urls.
List email templatesLists available email templates in salesforce with filtering and search capabilities.
List leadsLists leads from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List notesLists notes from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List opportunitiesLists opportunities from salesforce using soql query, allowing flexible filtering, sorting, and field selection.
List reportsLists all reports available in salesforce with basic metadata including name, id, and urls.
Log callLogs a completed phone call as a task in salesforce with call-specific details like duration, type, and disposition.
Log email activityCreates an emailmessage record to log email activity in salesforce, associating it with related records.
Mass transfer ownershipTransfers ownership of multiple records to a new owner in a single operation using salesforce's composite api for better performance.
Remove from campaignRemoves a lead or contact from a campaign by deleting the campaignmember record.
Run reportRuns a report and returns the results.
Run SOQL queryExecutes a soql query against salesforce data.
Search accountsSearch for salesforce accounts using multiple criteria like name, industry, type, location, or contact information.
Search campaignsSearch for salesforce campaigns using multiple criteria like name, type, status, date range, or active status.
Search contactsSearch for salesforce contacts using multiple criteria like name, email, phone, account, or title.
Search leadsSearch for salesforce leads using multiple criteria like name, email, phone, company, title, status, or lead source.
Search notesSearch for salesforce notes using multiple criteria like title, body content, parent record, owner, or creation date.
Search opportunitiesSearch for salesforce opportunities using multiple criteria like name, account, stage, amount, close date, or status.
Search tasksSearch for salesforce tasks using multiple criteria like subject, status, priority, assigned user, related records, or dates.
Send emailSends an email through salesforce with options for recipients, attachments, and activity logging.
Send email from templateSends an email using a predefined salesforce email template with merge field support.
Send mass emailSends bulk emails to multiple recipients, either using a template or custom content.
Update accountUpdates an existing account in salesforce with the specified changes.
Update campaignUpdates an existing campaign in salesforce with the specified changes.
Update contactUpdates an existing contact in salesforce with the specified changes.
Update leadUpdates an existing lead in salesforce with the specified changes.
Update noteUpdates an existing note in salesforce with the specified changes.
Update opportunityUpdates an existing opportunity in salesforce with the specified changes.
Update taskUpdates an existing task in salesforce with new information.

Why Use Composio?

AI Native Salesforce Integration

  • Supports both Salesforce MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Salesforce data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Salesforce access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Salesforce
  • Scoped, least privilege access to Salesforce resources
  • Full audit trail of agent actions to support review and compliance

Connect Salesforce MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Salesforce tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Create a new account for Acme Corp with industry set to Manufacturing')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect Salesforce API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Salesforce Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Add a new lead to the "Spring Campaign" and assign to sales team'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute Salesforce actions with your Agent

Use Salesforce with any AI Agent Framework

Choose a Framework you want to connect Salesforce with

OpenAI Agents SDK

OpenAI Agents SDK

Use Salesforce MCP with OpenAI Agents SDK

Claude Agents SDK

Claude Agents SDK

Use Salesforce MCP with Claude Agents SDK

Google ADK

Google ADK

Use Salesforce MCP with Google ADK

Langchain

Langchain

Use Salesforce MCP with Langchain

AI SDK

AI SDK

Use Salesforce MCP with AI SDK

Mastra AI

Mastra AI

Use Salesforce MCP with Mastra AI

LlamaIndex

LlamaIndex

Use Salesforce MCP with LlamaIndex

CrewAI

CrewAI

Use Salesforce MCP with CrewAI

Pydantic AI

Pydantic AI

Use Salesforce MCP with Pydantic AI

Autogen

Autogen

Use Salesforce MCP with Autogen

Frequently Asked Questions

Do I need my own developer credentials to use Salesforce with Composio?

No, you can get started immediately using Composio's built-in Salesforce app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.