Skip to main content

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.