Skip to content

Salesforce - Get Record

↩ Part of the Salesforce integration.

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesSalesforce credential
sobjecttextYesAPI name of the object: Account, Contact, Lead…
record_idtextYesRecord id (15 or 18 characters)
fieldstextNoFields 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.

This module requires a Salesforce credential:

FieldDescription
login_urlhttps://login.salesforce.com or https://test.salesforce.com for a sandbox
client_id / client_secretConsumer Key and Secret of the Connected App
usernameSalesforce user
passwordPassword plus the security token, concatenated

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 }
{
"credentials_id": "salesforce_prod",
"sobject": "Account",
"record_id": "{{data.accountId}}"
}
{
"credentials_id": "salesforce_prod",
"sobject": "Contact",
"record_id": "{{data.contactId}}",
"fields": "FirstName,LastName,Email,Phone,AccountId"
}
{
"credentials_id": "salesforce_prod",
"sobject": "Opportunity",
"record_id": "{{data.opportunityId}}",
"fields": "Name,StageName,Amount,CloseDate"
}
  • The fields list uses API names; an unknown one returns 400 INVALID_FIELD rather than being ignored.
  • With fields empty, 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 404 means the id does not exist for that sObject, or the user cannot see it. It is not retried.
  • If sobject or record_id resolve 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.