<!-- BusyBot node reference — https://busybot.net/tools/salesforce-trigger/ -->

> Node: Salesforce Trigger (`salesforce_trigger`) · Polling trigger · v1
> Category: Sales · Credentials: Salesforce OAuth2 (`salesforceOAuth2`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | None (trigger node) |
| Output | `Output` |

## Credentials

This tool requires **Salesforce OAuth2** credentials.
See the [Credentials Guide](https://busybot.net/credentials/salesforce-oauth2/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Salesforce Account | `credential` | No | — | Connect your Salesforce account via OAuth2. |
| Trigger On | `options` | Yes | — | Which 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 Name | `string` | Yes | — | The API name of the custom Salesforce object (e.g. "My_Custom_Object__c"). _(shown when Trigger On is `customObjectCreated` or `customObjectUpdated`)_ |
| Poll Interval | `number` | No | `1` | How often to check Salesforce for new data. |
| Poll Interval Unit | `options` | No | `minutes` | Unit 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:

```json
{
  "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:

| Object | Fields returned |
|--------|-----------------|
| Account | `Id`, `Name`, `Type` |
| Attachment | `Id`, `Name` |
| Case | `Id`, `AccountId`, `ContactId`, `Priority`, `Status`, `Subject`, `Type` |
| Contact | `Id`, `FirstName`, `LastName`, `Email` |
| Lead | `Id`, `Company`, `FirstName`, `LastName`, `Street`, `PostalCode`, `City`, `Email`, `Status` |
| Opportunity | `Id`, `AccountId`, `Amount`, `Probability`, `Type` |
| Task | `Id`, `Subject`, `Status`, `Priority` |
| User | `Id`, `Name`, `Email` |
| Custom object | `Id` |

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:

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

Watch a custom object for new records:

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

React quickly to opportunity changes:

```json
{
  "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.