Salesforce nodes for Node-RED built with @bonsae/nrg.
| Node | Description |
|---|---|
| Connection | OAuth 2.0 PKCE authentication with token management |
| SOQL | Execute SOQL queries and return matching records |
| DML | Create, read, update, delete, and upsert SObjects |
| Bulk | Bulk API 2.0 operations for large data volumes |
| Describe | Retrieve SObject metadata (fields, relationships, record types) |
| Streaming | Subscribe to Platform Events and Change Data Capture via Pub/Sub API (gRPC) |
| Apex | Invoke Apex REST endpoints |
- Node.js >= 22
- pnpm >= 10.11.0
- A Salesforce org with a Connected App configured for OAuth 2.0 with PKCE
pnpm add @bonsae/node-red-salesforceCreate a Connected App in Salesforce Setup:
- Go to Setup > App Manager > New Connected App
- Enable OAuth Settings
- Set the Callback URL to
{your-node-red-url}/salesforce/auth/callback - Enable Require Proof Key for Code Exchange (PKCE)
- Add required OAuth scopes (
api,refresh_token) - Save and copy the Consumer Key (Client ID)
- Drag a Salesforce node onto the canvas
- Double-click to configure
- Select or create a Connection config node
- In the Connection config, enter your Login URL, Client ID, and API Version
- Click Authorize with Salesforce to complete the OAuth PKCE flow
- Configure the node's specific settings (query, SObject type, etc.)
Wire an inject node to a SOQL node configured with a query like SELECT Id, Name FROM Account. The output msg.payload contains the array of records, msg.totalSize the total count, and msg.done whether all records were fetched.
Set the operation (create, read, update, delete, upsert) and SObject type. Pass record data in msg.payload:
- create/update/upsert: a record object or array of records
- read/delete: a record ID or array of IDs
- upsert: also set the External ID Field
For large data volumes. Pass an array of records in msg.payload for ingest operations, or a SOQL string for bulk queries.
Pass the SObject API name and receive the full describe result including fields, child relationships, and record type info.
Subscribes to Salesforce Platform Events and Change Data Capture events using the gRPC-based Pub/Sub API. This node has no input port -- it emits messages when events are received.
Configure the channel (e.g., /event/MyEvent__e), subscribe type (LATEST, EARLIEST, or CUSTOM with a replay ID), and batch size.
Invoke custom Apex REST endpoints. Set the HTTP method and path (e.g., /MyEndpoint). For POST/PUT/PATCH, the request body is taken from msg.payload.
# Install dependencies
pnpm install
# Start dev server (launches Node-RED with hot reload)
pnpm dev
# Build for production
pnpm build
# Run tests
pnpm test
# Type check
pnpm tsc:server
pnpm tsc:client
# Lint and format
pnpm lint
pnpm formatLabels and auto-generated help docs are available in:
- English (en-US)
- German (de)
- Spanish (es-ES)
- French (fr)
- Japanese (ja)
- Korean (ko)
- Portuguese (pt-BR)
- Russian (ru)
- Chinese Simplified (zh-CN)
- Chinese Traditional (zh-TW)
MIT