Nodes2Cloud
Nodes2CloudDocs
Integrations

Salesforce

Automate records, queries, flows, and triggers in Salesforce CRM

Salesforce Integration

The Salesforce integration allows you to interact with standard and custom sObjects in your Salesforce CRM, execute SOQL/SOSL queries, run Flow definitions, and trigger workflows automatically when records are created or updated.


How to get credentials

Salesforce nodes authenticate using OAuth 2.0 Connected App or an OAuth Access Token.

Method: Salesforce Connected App (OAuth 2.0)

  1. Log in to your Salesforce org as an administrator.
  2. In the top-right corner, click the Gear icon and select Setup.
  3. In the Quick Find search box on the left, search for App Manager and open it.
  4. Click New Connected App (top-right).
  5. Fill in the required basic information:
    • Connected App Name: e.g., Nodes2Cloud Integration
    • API Name: Nodes2Cloud_Integration
    • Contact Email: Your administrator email address
  6. Under API (Enable OAuth Settings):
    • Check the Enable OAuth Settings box.
    • Enter your callback URL (provided in your Nodes2Cloud workspace credential setup modal).
    • In Selected OAuth Scopes, add:
      • Manage user data via APIs (api)
      • Perform requests at any time (refresh_token, offline_access)
      • Access unique user identifiers (openid)
    • Uncheck Require Proof Key for Code Exchange (PKCE) if using web-server flow.
  7. Click Save and wait 2–10 minutes for Salesforce to propagate the new app across their servers.
  8. Click Manage Consumer Details to reveal your Consumer Key (Client ID) and Consumer Secret (Client Secret).
  9. In Nodes2Cloud, navigate to Credentials → New Credential → Salesforce, enter your Instance URL (your Salesforce org's My Domain URL, e.g., https://yourcompany.my.salesforce.com), and authorize access.

1. Salesforce: Create Record

What the node does

Creates a new record of any standard or custom sObject type (such as Lead, Contact, Account, Opportunity, or CustomObject__c) in your Salesforce org.

What each option/field does

  • Credential: Select your authenticated Salesforce OAuth credential.
  • Instance URL: Your org's My Domain URL (e.g. https://yourorg.my.salesforce.com).
  • Object Type: The API name of the target sObject (e.g., Lead, Contact, Account, Opportunity, or custom object like Invoice__c). You can choose from standard objects or type a custom API name.
  • Fields: JSON payload representing field names and values to assign to the new record (e.g. {"FirstName": "Jane", "LastName": "Doe", "Company": "Acme Corp"}).
  • API Version: The Salesforce REST API version (defaults to v61.0).

How to set it up

  1. Add the Salesforce: Create Record node to your workflow.
  2. Select your Salesforce credential and verify your Instance URL.
  3. Choose the Object Type (e.g. Lead).
  4. In the Fields editor, specify the record data:
    {
      "FirstName": "{{$json.first_name}}",
      "LastName": "{{$json.last_name}}",
      "Company": "{{$json.company}}",
      "Email": "{{$json.email}}"
    }
  5. Run the node. The output will return the newly created record ID and success status:
    {
      "id": "00Q5f000001abcdEAA",
      "success": true
    }

2. Salesforce: Get Record

What the node does

Retrieves an existing record by its 18-character (or 15-character) Salesforce record ID.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The target sObject API name (e.g., Contact).
  • Record ID: The unique ID of the record to fetch (e.g., 0035f00000Xyz12AAQ or dynamic reference {{$json.recordId}}).
  • Fields to Return: (Optional) Comma-separated list of field API names to retrieve (e.g. Id, FirstName, LastName, Email, Phone). If left empty, all accessible fields are returned.
  • API Version: REST API version (v61.0).

How to set it up

  1. Connect the node after an event or query that outputs a Salesforce Record ID.
  2. Specify the Object Type and enter {{$json.id}} in Record ID.
  3. (Optional) Provide field names in Fields to Return to limit payload size.
  4. The output contains the full field map of the retrieved record.

3. Salesforce: Update Record

What the node does

Updates specific fields on an existing Salesforce record by its Record ID.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The sObject API name (e.g., Opportunity).
  • Record ID: The ID of the record being updated.
  • Fields: JSON object containing only the fields you wish to update (e.g. {"StageName": "Closed Won", "Amount": 50000}).
  • API Version: REST API version (v61.0).

How to set it up

  1. Select the Object Type and enter the target Record ID.
  2. Supply the JSON fields to update:
    {
      "Status": "Working - Contacted",
      "Rating": "Hot"
    }
  3. When executed, Salesforce updates the record with a 204 No Content response, indicating success.

4. Salesforce: Upsert Record

What the node does

Updates an existing record if a match is found based on an External ID field, or creates a new record if no match exists.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The target sObject (e.g., Account or Contact).
  • External ID Field: The API name of the field designated as an External ID in Salesforce (e.g., Stripe_Customer_ID__c or ERP_Customer_Number__c).
  • External ID Value: The value to match against (e.g., cus_N9f8s7d6f5).
  • Fields: JSON payload of record values to write or update.
  • API Version: REST API version (v61.0).

How to set it up

  1. Ensure the field in Salesforce has the External ID attribute enabled.
  2. Select your Object Type and enter the External ID Field API name.
  3. Pass the unique identifier in External ID Value and the payload in Fields.
  4. The node returns the record ID and a boolean indicator showing whether a new record was created or an existing one was updated.

5. Salesforce: Delete Record

What the node does

Deletes a record from Salesforce and moves it to the Salesforce Recycle Bin.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The sObject API name (e.g., Lead).
  • Record ID: The ID of the record to delete.
  • API Version: REST API version (v61.0).

How to set it up

  1. Provide the Object Type and Record ID.
  2. Execute the node. A successful deletion confirms removal from active Salesforce views.

6. Salesforce: SOQL Query

What the node does

Executes a custom SOQL (Salesforce Object Query Language) query against your Salesforce database and returns matching records.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • SOQL Query: The complete SQL-like query string (e.g., SELECT Id, Name, StageName, Amount FROM Opportunity WHERE IsClosed = false AND Amount > 10000 ORDER BY Amount DESC LIMIT 50).
  • API Version: REST API version (v61.0).

How to set it up

  1. In the SOQL Query field, write your SOQL statement. You can insert dynamic variables from upstream nodes:
    SELECT Id, FirstName, LastName, Email FROM Contact WHERE AccountId = '{{$json.accountId}}'
  2. The output provides an array of matching records under records along with totalSize.

7. Salesforce: Find Record

What the node does

Searches for records on a specific sObject matching simple field equality, inequality, or pattern conditions without needing to write raw SOQL.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The target sObject (e.g., Contact).
  • Field: The API name of the field to filter by (e.g., Email).
  • Operator: Comparison operator (=, !=, LIKE, >, <).
  • Value: The value to match against (e.g. [email protected]).
  • Fields to Return: Comma-separated list of field names to retrieve.
  • Limit: Maximum number of records to return (defaults to 1).

How to set it up

  1. Select the Object Type (e.g. Account).
  2. Set Field to Website, Operator to =, and Value to {{$json.domain}}.
  3. Set Limit to 1 to locate the single matching account.

8. Salesforce: Search Records (SOSL)

What the node does

Performs a full-text search across multiple Salesforce objects and text fields using SOSL (Salesforce Object Search Language).

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • SOSL Query: The text search query string (e.g., FIND {Acme} IN ALL FIELDS RETURNING Account(Id, Name), Contact(Id, Name, Email)).
  • API Version: REST API version (v61.0).

How to set it up

  1. Supply a SOSL statement in SOSL Query.
  2. The output returns search results grouped by object type.

9. Salesforce: Execute Flow

What the node does

Invokes an active Auto-launched Flow in your Salesforce org and receives its output parameters.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Flow API Name: The API name of the active Auto-launched Flow (e.g. Calculate_Discount_Tier).
  • Inputs: JSON object of input parameters required by the Flow (e.g. {"accountId": "{{$json.id}}", "orderTotal": 1500}).
  • API Version: REST API version (v61.0).

How to set it up

  1. In Salesforce Setup, ensure your Flow type is Auto-launched Flow (No Trigger) and is Activated.
  2. Enter the exact Flow API Name in the node.
  3. Pass input variables in the Inputs field matching the flow's input variables.
  4. The node returns execution status and any output variables populated by the Flow.

10. Salesforce Trigger (Record Created / Updated)

What the node does

Monitors a Salesforce sObject on a schedule and starts the workflow whenever new records are created or existing records are updated.

What each option/field does

  • Credential: Your connected Salesforce credential.
  • Instance URL: Your Salesforce My Domain URL.
  • Object Type: The sObject to monitor (e.g. Lead or Opportunity).
  • Trigger Event:
    • On Record Created: Triggers only when new records are added (tracks CreatedDate).
    • On Record Updated: Triggers when records are added or modified (tracks SystemModstamp).
  • Fields to Fetch: Comma-separated list of fields to include in the trigger payload (e.g. Id, Name, Email, Status, CreatedDate, SystemModstamp).
  • API Version: REST API version (v61.0).

How to set it up

  1. Add the Salesforce Trigger as the first node in your workflow.
  2. Select the Object Type (e.g., Lead) and choose the Trigger Event (e.g., On Record Created).
  3. Ensure CreatedDate or SystemModstamp is present in Fields to Fetch.
  4. When deployed, the trigger regularly polls Salesforce and outputs an array of new or modified records to downstream nodes.

Common Troubleshooting

  • INVALID_SESSION_ID / 401 Unauthorized: Your Salesforce access token has expired or the Connected App permissions were revoked. Re-authenticate your Salesforce credential in Nodes2Cloud.
  • REQUIRED_FIELD_MISSING: Salesforce enforces required fields at the schema and validation rule level. Ensure all mandatory fields (such as LastName and Company on Leads) are included in your JSON payload.
  • MALFORMED_QUERY: When using SOQL or Find nodes, string literals in queries must be enclosed in single quotes (e.g., WHERE Email = '[email protected]'). Text containing single quotes (e.g., O'Connor) must be escaped (O\'Connor).
  • NOT_FOUND / 404: Verify that the Record ID exists and has not been hard-deleted. Also ensure your connected Salesforce user has Read access to the specific Object and Record via their Profile / Permission Sets.
  • CANNOT_EXECUTE_FLOW_TRIGGER: Ensure the Flow is activated and is configured as an Auto-launched Flow. Screen Flows cannot be executed via API.

On this page