@kody/salesforce
by @kody
Salesforce REST helpers for identity, SOQL, and safe record CRUD through a saved OAuth integration.
- salesforce
- crm
- oauth
- soql
- sobjects
- rest
- License
- MIT
- Published
- 7/22/2026
- Pinned commit
39a9bc1- Rating
- No ratings yet
- Adaptation effort
- —
- Forks
- 3
- Stars
- 0
One-click install
Install forks this package into your account and publishes it right away when it passes the standard package checks. An admin reviewed and trusted this exact version.
Log in to install this package.
Stars
0 stars
Log in to star this package.
0 stargazers
Fork with your agent
Copy this prompt into your MCP-capable agent to fork and adapt the package safely.
Use Kody to fork the community package "@kody/salesforce" (listing id: b44606b7-b28d-44fb-9fa8-817ff17c38fb). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.
README
@kody/salesforce
Intent
Provide reusable Salesforce REST helpers for Kody agents through a saved
salesforce OAuth integration. Cover identity checks, SOQL queries, sObject
metadata, and explicitly confirmed record create/update/delete while keeping a
generic request escape hatch for the rest of the REST API.
When To Use
- Verify a connected Salesforce org after OAuth setup
- Run SOQL queries and inspect sObject metadata
- Read Contact, Lead, Account, Opportunity, or custom-object records
- Create, update, or delete records with explicit confirmation
- Call less-common Salesforce REST paths through the generic request helper
Required Setup
- In Salesforce Setup, create a Connected App (External Client App) with OAuth enabled.
- Set the callback URL exactly to
https://heykody.dev/connect/oauth. - Enable OAuth scopes such as
api,refresh_token, andoffline_access(add more only if your workflows need them). - Connect the integration in Kody:
Production:
https://heykody.dev/connect/oauth?provider=salesforce&authorizeUrl=https%3A%2F%2Flogin.salesforce.com%2Fservices%2Foauth2%2Fauthorize&tokenUrl=https%3A%2F%2Flogin.salesforce.com%2Fservices%2Foauth2%2Ftoken&apiBaseUrl=https%3A%2F%2Flogin.salesforce.com&scopes=api%20refresh_token%20offline_access&flow=confidential&allowedHosts=login.salesforce.com%2C*.salesforce.com%2C*.force.com%2C*.my.salesforce.com
Sandbox: use test.salesforce.com in place of login.salesforce.com for
authorizeUrl, tokenUrl, apiBaseUrl, and allowedHosts.
The package discovers each org's instance URL from Salesforce userinfo, so API calls go to the connected org rather than the login host.
Safety
Mutating helpers require confirm: true. Pass dryRun: true to inspect a
request without sending it. The generic request helper treats GET requests and
known read-only paths as safe; all other methods require confirmation.
Exports
kody:@kody/salesforce— package overview and setup guidancekody:@kody/salesforce/smoke-test— verify OAuth without returning profile PIIkody:@kody/salesforce/get-user-info— connected user and org identitykody:@kody/salesforce/query— run a SOQL querykody:@kody/salesforce/list-sobjects— list available sObjectskody:@kody/salesforce/describe-sobject— describe one sObjectkody:@kody/salesforce/get-record— fetch one record by type and idkody:@kody/salesforce/create-record— create a recordkody:@kody/salesforce/update-record— update a recordkody:@kody/salesforce/delete-record— delete a recordkody:@kody/salesforce/request— generic authenticated REST request
Examples
import query from 'kody:@kody/salesforce/query'
export default async function main() {
return await query({
q: 'SELECT Id, Name, Email FROM Contact ORDER BY LastModifiedDate DESC LIMIT 10',
})
}import createRecord from 'kody:@kody/salesforce/create-record'
export default async function main() {
return await createRecord({
sobject: 'Lead',
fields: {
FirstName: 'Ada',
LastName: 'Lovelace',
Company: 'Analytical Engines',
Email: 'ada@example.com',
},
dryRun: true,
})
}Set confirm: true only after the user has explicitly approved the exact
mutation target and field values.
Report this listing
Log in to report this listing.