langchain-salesforce
LangChain integration for Salesforce CRM. Query data with SOQL, inspect schemas, and manage records (CRUD) directly from your LangChain applications.
Installation
pip install -U langchain-salesforce
Configuration
Set these environment variables:
| Variable | Description |
|---|---|
SALESFORCE_USERNAME |
Your Salesforce username |
SALESFORCE_PASSWORD |
Your Salesforce password |
SALESFORCE_SECURITY_TOKEN |
Your Salesforce security token |
SALESFORCE_DOMAIN |
login (production) or test (sandbox). Default: login |
Quick Start
from langchain_salesforce import SalesforceTool
tool = SalesforceTool()
# Query contacts
result = tool.run({
"operation": "query",
"query": "SELECT Id, Name, Email FROM Contact LIMIT 5"
})
Operations
| Operation | Description | Required Parameters |
|---|---|---|
query |
Execute SOQL queries | query |
describe |
Get object schema | object_name |
list_objects |
List all SObjects | — |
create |
Create a record | object_name, record_data |
update |
Update a record | object_name, record_id, record_data |
delete |
Delete a record | object_name, record_id |
get_field_metadata |
Get field details | object_name, field_name |
Examples
# Describe an object
tool.run({"operation": "describe", "object_name": "Account"})
# Create a record
tool.run({
"operation": "create",
"object_name": "Contact",
"record_data": {"LastName": "Doe", "Email": "doe@example.com"}
})
# Update a record
tool.run({
"operation": "update",
"object_name": "Contact",
"record_id": "003XXXXXXXXXXXXXXX",
"record_data": {"Email": "updated@example.com"}
})
# Delete a record
tool.run({"operation": "delete", "object_name": "Contact", "record_id": "003XXXXXXXXXXXXXXX"})
Development
git clone https://github.com/colesmcintosh/langchain-salesforce.git
cd langchain-salesforce
uv sync --all-groups
make format # Format code
make lint # Run linters
make test # Run tests
See CONTRIBUTING.md for guidelines.
License
MIT License. See LICENSE.
Metadata
Release files for langchain-salesforce 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_salesforce-0.2.2.tar.gz | 223.3 kB | With provenance | Details for langchain_salesforce-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_salesforce-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for langchain_salesforce-0.2.2-py3-none-any.whl |
Total release size: 230.0 kB
Release files / langchain_salesforce-0.2.2.tar.gz
| Download URL | langchain_salesforce-0.2.2.tar.gz |
|---|---|
| Size | 223.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a89ff4797bbb1d56141b6e72b54c637dc4b551fc7a92bfa3e06639c4544c0c2c
|
|
BLAKE2b-256 checksum How to use checksums |
b4b81539b7caa507c86c0d680d09df87013cc473d4122c30ff0daa1ebc90f449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 27, 2025.
Transparency logRelease files / langchain_salesforce-0.2.2-py3-none-any.whl
| Download URL | langchain_salesforce-0.2.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6995ba6cb5915fae12e33b9346cd7c302c8e91106aa000a7364ec8ece34de66a
|
|
BLAKE2b-256 checksum How to use checksums |
40d808d912fe7c331e5e489f5cfc436f3de14ff449cb6ea3d6b4ee6f6adff4a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 27, 2025.
Transparency logSecurity for langchain-salesforce 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for langchain_salesforce-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 27, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.