Skip to main content

Salesforce


Salesforce:Create Record

Controlled node

Overview

Creates a new record in Salesforce using the Salesforce API. This node requires a valid Salesforce connection and the API name of the sObject (e.g., "Account", "Contact", "Opportunity") you want to create. The record data should be provided as an object containing the field values for the new record.

Prerequisites

You must configure a Salesforce connection in your project settings before using this node. The connection is selected via the Connection property in the node's panel UI.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the node to create the record in Salesforce.-
sObject API NameTextThe API name of the Salesforce object to create (e.g., "Account", "Contact", "Lead", "Opportunity").-
DataDataAn object containing the field values for the new record (e.g., { "Name": "Acme Corp", "Industry": "Technology" }).-
ConnectionConnectionThe Salesforce connection to use (configured in the properties panel).-

Outputs

OutputTypeDescription
DoneEventFires when the record creation is complete, regardless of success or failure.
RecordDataThe created Salesforce record object if successful, or an error object if the creation failed.

Runtime Behavior and Defaults

When triggered by the Run event, the node validates that:

  1. A valid Salesforce Connection is selected
  2. The sObject API Name is provided (e.g., "Account", "Contact")
  3. The Data input is a valid object containing the field values

If validation passes, the node calls the Salesforce API to create the record. Upon completion:

  • The Done event fires
  • The Record output contains the newly created record data (including the generated Salesforce ID) on success
  • If an error occurs (e.g., invalid field names, validation rules, or API limits), the Record output contains an error object with the message
Error Handling

Connect an Assert node to the Record output to check for errors before proceeding with downstream logic.

Example

Creating a new Account:

  1. Connect a Start node (or any trigger event) to the Run input
  2. Set sObject API Name to "Account"
  3. Provide Data as an object:
    {
    "Name": "Acme Corporation",
    "Industry": "Technology",
    "BillingCity": "San Francisco",
    "BillingState": "CA"
    }
  4. Connect the Done event to a Show node to display the result
  5. The Record output will contain the created Account record, including the Id field generated by Salesforce

Using with AI Write Data: You can use the AI Write Data node to generate the record data structure dynamically based on unstructured input text, then pass that object to the Data input of the Salesforce Create Record node.


Salesforce:Describe sObject

Controlled node

Overview

Retrieves detailed metadata about a specific Salesforce sObject (standard or custom object). This node queries the Salesforce API to return the complete schema definition including fields, data types, relationships, and other object properties. Use this to dynamically inspect Salesforce object structures before creating records or building queries.

Common Use Cases
  • Inspecting field names and types before using Salesforce: Create Record
  • Validating that a custom object exists and has the expected fields
  • Building dynamic SOQL queries by first understanding the object schema

Inputs

InputTypeDescriptionDefault
RunEventTriggers the node to fetch the sObject description.-
sObject API NameTextThe API name of the Salesforce object to describe (e.g., Account, Contact, Opportunity, or CustomObject__c).-
ConnectionConnectionThe Salesforce connection to use for the API call. Configure this in the properties panel or wire it from another node.-

Outputs

OutputTypeDescription
DoneEventFires when the sObject description has been successfully retrieved.
sObjectDataThe complete sObject metadata object containing fields, child relationships, record type info, and other schema details. Returns an error object if the sObject doesn't exist or the connection fails.

Runtime Behavior and Defaults

When triggered, the node makes a synchronous call to the Salesforce REST API using the provided connection credentials. It retrieves the sObject metadata via the describe endpoint and outputs the full schema definition.

  • Error Handling: If the sObject API name doesn't exist or the connection is invalid, the sObject output will contain an error object with details.
  • Permissions: The connected Salesforce user must have read access to the object being described.
  • Rate Limits: Subject to Salesforce API rate limits for metadata calls.

Example

Scenario: You want to create a new Account record but need to know the exact field names and required fields first.

  1. Add a Salesforce: Describe sObject node to your workflow.
  2. In the properties panel, select your Salesforce Connection.
  3. Set the sObject API Name to Account (or wire it from a Text node).
  4. Connect the Done event to a Show node to inspect the returned schema.
  5. The output will include details like:
    • fields: Array of field definitions including name, type, length, nillable, etc.
    • childRelationships: Related objects
    • recordTypeInfos: Available record types

You can then use this metadata to construct proper data payloads for the Salesforce: Create Record node.


Salesforce:Describe Global

Controlled node

Overview

Retrieves metadata describing all available sObjects (Salesforce objects) in the connected Salesforce instance. This node performs a global describe operation that returns information about every object accessible to the authenticated user, including object names, labels, and key properties. Use this node to discover available Salesforce objects before performing queries or record operations.

Inputs

InputTypeDescriptionDefault
RunEventFires when the node starts running-
ConnectionConnectionSalesforce connection to use for the describe operation-

Outputs

OutputTypeDescription
DoneEventFires when the node has finished executing
SchemaDataContains the global describe results, including an array of sObject metadata (names, labels, custom flags, etc.)

Runtime Behavior and Defaults

This node requires a valid Salesforce connection to be configured in the properties panel or passed as an input. When executed, it calls the Salesforce describeGlobal API to retrieve metadata about all accessible sObjects.

If the connection is missing or invalid, the Schema output will contain an error object with a descriptive message. The node does not cache results between runs.

Example Usage

Connect a Start node or any event-triggering node to the Run input to execute the describe operation. The Schema output can be connected to a Show node to inspect available objects, or used with Get Value nodes to extract specific sObject names for dynamic queries.

For example, you might use this node to:

  • Populate a dropdown with available Salesforce object types
  • Validate that a specific object exists before attempting to create records
  • Discover custom objects available in the org
  • Build dynamic SOQL queries based on available objects

Salesforce:Query

Controlled node

Overview

The Salesforce Query node allows you to execute SOQL (Salesforce Object Query Language) queries against your connected Salesforce instance. This node is essential for retrieving data from Salesforce objects such as Accounts, Contacts, Opportunities, and custom objects.

The node requires a valid Salesforce connection configured in your project settings. Once connected, you can write SOQL queries to fetch specific records, filter data, and retrieve related records. The query results are returned as a list of records that can be processed by downstream nodes in your workflow.

SOQL Syntax

SOQL is similar to SQL but designed specifically for Salesforce. For example: SELECT Id, Name, Email FROM Contact WHERE CreatedDate = LAST_N_DAYS:30. Refer to Salesforce documentation for complete SOQL syntax and limitations.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the execution of the SOQL query.-
SOQLTextThe SOQL query string to execute against Salesforce. Must be valid SOQL syntax.-
ConnectionConnectionThe Salesforce connection to use for the query. Configure this in your project connections panel.-

Outputs

OutputTypeDescription
DoneEventFires when the query has completed successfully or failed.
RecordsDataContains the list of records returned by the SOQL query. Returns an error object if the query fails.

Runtime Behavior and Defaults

  • Controlled Execution: This node requires a Run event to execute. It will not run automatically when data changes.
  • Connection Validation: The node validates that a Salesforce connection is provided before executing. If no connection is specified, it returns an error.
  • Query Validation: The SOQL query must be provided as a string. If empty or invalid, the node returns an error.
  • Error Handling: If the query fails (invalid SOQL, insufficient permissions, etc.), the Records output will contain an error object with the failure message.
  • Result Format: Successful queries return an array of record objects. Each object contains the fields specified in your SELECT clause.

Example Usage

Basic Contact Query

To retrieve recently created contacts:

  1. Connect a Start node or any event-triggering node to the Run input.
  2. Set the SOQL input to: SELECT Id, FirstName, LastName, Email FROM Contact WHERE CreatedDate = LAST_N_DAYS:7
  3. Configure the Connection input with your Salesforce connection.
  4. Connect the Records output to a node that processes the contact data (e.g., Show node to view results, or For Each to iterate through contacts).

Query with Variables

You can use template variables in your SOQL query by connecting data inputs:

SELECT Id, Name FROM Opportunity WHERE StageName = '{{stageName}}' AND Amount > {{minAmount}}

Connect a Text node or variable to provide dynamic values for stageName and minAmount.

Error Handling Pattern

Connect the Done event to an If node that checks if Records contains an error:

// Check if query failed
{{#if records.error}}
// Handle error
{{else}}
// Process records
{{/if}}

Salesforce:Update Record

Controlled node

Overview

Updates an existing Salesforce record using the Salesforce API. This node requires a Salesforce connection, the API name of the sObject, the ID of the record to update, and an object containing the fields to change.

Use this node when a workflow needs to enrich, correct, or synchronize an existing Salesforce record from workflow data.

Prerequisites

You must configure a Salesforce connection in your project settings before using this node. The connection is selected via the Connection property in the node panel.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the record update.-
sObject API NameTextThe API name of the Salesforce object to update, such as Account, Contact, Lead, or a custom object API name.-
Record IDTextThe Salesforce ID of the existing record to update.-
DataDataAn object containing the field values to update, such as { "Industry": "Technology" }.-
ConnectionConnectionThe Salesforce connection to use for the API call.-

Outputs

OutputTypeDescription
DoneEventFires when the update operation has completed, regardless of success or failure.
ResultDataThe Salesforce update result on success, or an error object if validation or the API call fails.

Runtime Behavior and Defaults

  • Controlled Node: The node runs only when the Run event fires.
  • Project Requirement: A runtime project ID is used with the selected Salesforce connection.
  • Connection Validation: If Connection is missing, Result contains { "error": "Connection is required" }.
  • sObject Validation: If sObject API Name is missing, Result contains { "error": "sObject API Name is required" }.
  • Record Validation: If Record ID is missing, Result contains { "error": "Record ID is required" }.
  • Data Validation: Data must be an object. If it is missing or not an object, Result contains { "error": "Data must be a valid object" }.
  • Error Handling: Salesforce API errors are returned through Result as an error object containing the error message.

Example Usage

Update an Account

  1. Connect a Start node or another event source to Run.
  2. Set sObject API Name to "Account".
  3. Set Record ID to the Salesforce record ID you want to update.
  4. Connect a Dictionary node or AI Write Data output to Data.
  5. Select the Salesforce Connection in the node panel.
  6. Connect Result to Show or branch on the result in downstream logic.

Example update payload:

{
"Industry": "Technology",
"BillingCity": "London"
}
tip

Use Salesforce:Describe sObject to inspect available fields before building the update payload, especially for custom objects or fields.