Reference · Tools

Salesforce Trigger

Starts workflow when Salesforce records are created or updated

Polling trigger Sales v1

The Salesforce Trigger starts a workflow when records are created or updated, polling with SOQL queries and a 15-minute safety margin so records are still caught when Salesforce indexing lags. A typical build is reacting to every new lead without waiting for someone to check the queue.

Node type
Polling trigger
Parameters
5
Outputs
Output
Credentials
Salesforce OAuth2

Salesforce Trigger

Trigger workflows when Salesforce records are created or updated

Overview

The Salesforce Trigger node polls the Salesforce REST API on a configurable schedule using SOQL queries to detect new or modified records. It supports 18 trigger events covering standard Salesforce objects (Account, Attachment, Case, Contact, Lead, Opportunity, Task, User) plus custom objects, with separate Created and Updated events for each. The polling logic uses a 15-minute safety margin on the start time to account for Salesforce indexing delays, and maintains a sliding window of up to 10,000 processed record IDs to prevent duplicate processing. For “Updated” events, the SOQL query additionally excludes records whose CreatedDate falls within the poll window, ensuring that newly created records are not reported as updates. On the first poll, it establishes a baseline timestamp and returns no items. The node authenticates via OAuth2 and supports automatic token refresh.

Category: Sales
Tool Name: salesforce_trigger
Version: 1

Appearance: Icon: lucide-CircleDollarSign | Color: #00a1e0

Node Type

Trigger — polling (checks for new data on a schedule)

Input / Output

DirectionPort(s)
InputNone (trigger node)
OutputOutput

Credentials

This tool requires Salesforce OAuth2 credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
Salesforce AccountcredentialNoConnect your Salesforce account via OAuth2.
Trigger OnoptionsYesWhich Salesforce event should trigger the workflow.
Options: accountCreated (a new account is created), accountUpdated (an existing account is modified), attachmentCreated (a file is uploaded and attached to an object), attachmentUpdated (an existing attachment is modified), caseCreated, caseUpdated, contactCreated, contactUpdated, customObjectCreated (a new record of a given custom object type is created), customObjectUpdated (a record of a given custom object type is modified), leadCreated, leadUpdated, opportunityCreated, opportunityUpdated, taskCreated, taskUpdated, userCreated, userUpdated
Custom Object API NamestringYesThe API name of the custom Salesforce object (e.g. “My_Custom_Object__c”). (shown when Trigger On is customObjectCreated or customObjectUpdated)
Poll IntervalnumberNo1How often to check Salesforce for new data.
Poll Interval UnitoptionsNominutesUnit for the poll interval.
Options: seconds, minutes, hours

Output Data

Each new or updated record becomes one output item. The record is emitted exactly as the SOQL query returns it, plus two trigger markers:

{
  "Id": "001000000000001AAA",
  "Name": "Acme Corp",
  "Type": "Customer",
  "_trigger": "salesforce_polling",
  "_timestamp": "2026-08-15T09:00:00.000Z"
}
  • _trigger — always salesforce_polling.
  • _timestamp — when the poll that produced the item ran.

The record fields depend on which object you are watching:

ObjectFields returned
AccountId, Name, Type
AttachmentId, Name
CaseId, AccountId, ContactId, Priority, Status, Subject, Type
ContactId, FirstName, LastName, Email
LeadId, Company, FirstName, LastName, Street, PostalCode, City, Email, Status
OpportunityId, AccountId, Amount, Probability, Type
TaskId, Subject, Status, Priority
UserId, Name, Email
Custom objectId

Use a downstream Salesforce node to fetch the remaining fields of a record by its Id. Reference record data by expression, e.g. {{ $json.Id }}.

Usage Examples

  • Start a workflow when a new lead is created in Salesforce
  • Trigger an automation when an opportunity is updated
  • Monitor Salesforce for new support cases
  • Detect when contact records are modified
  • Watch for new accounts created in Salesforce CRM
  • Trigger a notification when a task is assigned

Example Configuration

Start a workflow for every new contact:

{
  "type": "salesforce_trigger",
  "parameters": {
    "triggerOn": "contactCreated",
    "pollInterval": 5,
    "pollIntervalUnit": "minutes"
  }
}

Watch a custom object for new records:

{
  "type": "salesforce_trigger",
  "parameters": {
    "triggerOn": "customObjectCreated",
    "customObject": "My_Custom_Object__c",
    "pollInterval": 2,
    "pollIntervalUnit": "minutes"
  }
}

React quickly to opportunity changes:

{
  "type": "salesforce_trigger",
  "parameters": {
    "triggerOn": "opportunityUpdated",
    "pollInterval": 30,
    "pollIntervalUnit": "seconds"
  }
}

Trigger Behavior

  • Activation: Polling starts when the workflow is activated. There is no poll at the moment of activation — the first check runs one full interval later.
  • Schedule: The trigger polls for new data based on the configured polling interval.
  • State: Maintains internal state (the last poll timestamp plus a rolling list of up to 10,000 record IDs already delivered) so each poll returns only records you have not seen.
  • First Run: The first poll records the current time and returns no items, so activating the workflow never replays existing records.
  • Testing: Running the node from the editor emits a single sample record so you can build the rest of the workflow; real records arrive only while the workflow is activated.

Tips

Select a Salesforce trigger event (e.g., “Lead Created”, “Opportunity Updated”) and configure your poll interval. The trigger uses SOQL queries with a 15-minute safety margin to reliably detect records even when Salesforce indexing is delayed. For custom objects, provide the API name of the custom object. The first poll establishes a baseline — subsequent polls return only new records.

Important Notes

  • The customObject parameter is only required and visible when triggerOn is set to "customObjectCreated" or "customObjectUpdated".
  • Use the exact API name for custom objects (typically ending with __c).
  • Poll intervals should balance responsiveness with API rate limits.
  • The trigger only fires for records created or updated after the workflow is activated.
  • Because each poll re-queries a window that starts 15 minutes before the last check, records can appear more than once in the query results; the stored ID list is what keeps them from being delivered twice.

Frequently asked questions

Why the 15-minute safety margin?

Salesforce indexing can be delayed, so a naive 'since last poll' query silently misses records. The margin trades a little redundancy for reliable detection.

Will it replay existing records when I activate it?

No — the first poll establishes a baseline and subsequent polls return only new records.

Can it watch custom objects?

Yes — supply the API name of the custom object. That parameter is only required when the event you selected targets a custom object.

Which credential does it need?

A Salesforce OAuth2 credential, the same one the Salesforce action node uses.

Build with the Salesforce Trigger node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Salesforce OAuth2 credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.