Salesforce - Get Record
↩ Part of the Salesforce integration.
Description
Section titled “Description”Reads a single record by its id (GET /sobjects/{sobject}/{id}).
When you already have the id, this is faster and simpler than a SOQL query. Leave the field list empty to get every field the user can see, or name the fields you actually need to keep the payload small.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | credentials | Yes | Salesforce credential |
sobject | text | Yes | API name of the object: Account, Contact, Lead… |
record_id | text | Yes | Record id (15 or 18 characters) |
fields | text | No | Fields to return, comma-separated (e.g. Name,Email). Empty = all |
All the fields accept dynamic variables, so record_id is normally {{data.id}} from a previous node. Whitespace in fields is stripped automatically, so Name, Email and Name,Email behave the same.
Credentials
Section titled “Credentials”This module requires a Salesforce credential:
| Field | Description |
|---|---|
login_url | https://login.salesforce.com or https://test.salesforce.com for a sandbox |
client_id / client_secret | Consumer Key and Secret of the Connected App |
username | Salesforce user |
password | Password plus the security token, concatenated |
Output
Section titled “Output”data is the record exactly as Salesforce returns it, including the attributes block:
{ "attributes": { "type": "Account", "url": "/services/data/v59.0/sobjects/Account/0015g00000AbCdEFGH" }, "Id": "0015g00000AbCdEFGH", "Name": "ACME S.A.", "Phone": "+34600111222", "Industry": "Manufacturing"}Along with it, _meta:
{ "moduleVersion": "1.0.0", "success": true, "id": "0015g00000AbCdEFGH", "totalMs": 210 }Usage Example
Section titled “Usage Example”Full account
Section titled “Full account”{ "credentials_id": "salesforce_prod", "sobject": "Account", "record_id": "{{data.accountId}}"}Contact with selected fields
Section titled “Contact with selected fields”{ "credentials_id": "salesforce_prod", "sobject": "Contact", "record_id": "{{data.contactId}}", "fields": "FirstName,LastName,Email,Phone,AccountId"}Opportunity before updating it
Section titled “Opportunity before updating it”{ "credentials_id": "salesforce_prod", "sobject": "Opportunity", "record_id": "{{data.opportunityId}}", "fields": "Name,StageName,Amount,CloseDate"}- The
fieldslist uses API names; an unknown one returns400 INVALID_FIELDrather than being ignored. - With
fieldsempty, Salesforce returns every field the running user has access to — which can be a large payload on standard objects. - Ids of 15 characters are case-sensitive; ids of 18 characters are not. Both are accepted.
- A
404means the id does not exist for that sObject, or the user cannot see it. It is not retried. - If
sobjectorrecord_idresolve to an empty value, the node stops with a validation error before calling Salesforce. - To read several records at once, or to search by something other than the id, use SOQL query.
Related Nodes
Section titled “Related Nodes”- Salesforce: SOQL query — find the id when you only have an email or a name.
- Salesforce: Update record — modify the record you just read.
- Salesforce: Delete record — remove it.