Skip to main content

Salesforce Adapter

A Transform Custom node that queries and updates Salesforce records over the REST API as messages pass through a workflow.

Part of the Linkiir Adapters package — see requesting the package.

What it does

When a message reaches the node, it authenticates against your Salesforce org, runs the query or update the node is configured for, and passes the result downstream. Tokens are cached and reused until they near expiry.

upstream node → Salesforce Adapter → your next node

Salesforce REST API

Because it is a transform node, it can sit anywhere in a workflow: enriching a message with CRM data on the way through, or delivering the message into Salesforce as the final step.

Before you start

Create a connected app in your Salesforce org, configured for the client credentials flow:

  1. In Salesforce Setup, create a Connected App with OAuth enabled.
  2. Enable the Client Credentials Flow in the OAuth section.
  3. Assign a Run-As User to the connected app.
  4. Confirm the app has API access scopes.
  5. Note the Client ID (consumer key) and Client Secret (consumer secret).

You also need your org's My Domain host, for example myorg.my.salesforce.com. Enter it without the https:// prefix.

Set it up

  1. Open the Salesforce node in the Workflow Builder and click Edit.

  2. Fill in the connection fields:

    FieldValue
    DomainYour My Domain host, no https://
    Client IDThe connected app's consumer key
    Client SecretThe connected app's consumer secret
    API VersionThe REST API version your org supports
  3. Set Live Mode off, then Save.

  4. Connect an upstream node, send one message through, and check the log. Authentication still runs, so this pass proves the connected app is configured correctly.

  5. Turn Live Mode on and send another message.

Already have a token

If your environment issues bearer tokens through another process, enter it in the Key field. When Key is set the node uses it directly and skips the OAuth exchange, so Client ID and Client Secret are not needed.

Configuration reference

FieldTypeDefaultPurpose
Domainstring(empty)Salesforce instance domain, without the https:// prefix
Client IDstring(empty)OAuth consumer key from the connected app
Client Secretpassword(empty)OAuth consumer secret from the connected app
Keypassword(empty)An existing bearer token. When set, the node uses it instead of the OAuth exchange
API Versionstring59.0Salesforce REST API version
Live ModebooltrueWhen off, no requests are sent
Verify TLSbooltrueVerify the Salesforce TLS certificate

Verify it worked

  • With Live Mode off, a message passes through and the log shows the request that would have been sent.
  • With Live Mode on, the log shows the Salesforce response status, and the record appears or updates in the org.

If it didn't work

Symptom in the logCauseFix
CONFIG_ERROR naming a fieldDomain, Client ID, or Client Secret is empty, and no Key is setFill the fields, or supply a Key
AUTH_FAILED mentioning an unsupported grantThe connected app does not have the Client Credentials Flow enabledEnable it in the app's OAuth settings
AUTH_FAILED mentioning a run-as userNo Run-As User is assigned to the connected appAssign one
HTTP_400 on a queryThe query references a field or object the Run-As User cannot seeGrant the user access, or change the query
HTTP_404Domain is wrong, or API Version is newer than the org supportsCorrect the domain; lower the API version
failed to decrypt fieldThe project was imported to a different installationRe-enter Client Secret on this installation
Nothing reaches SalesforceLive Mode is offTurn Live Mode on

Next