Salesforce Trigger
Starts workflow execution when Salesforce records are created or updated — or when a file is attached to a record.
Overview
The Salesforce Trigger polls a connected Salesforce org and runs your workflow once for each new item it finds. Pick a Trigger type:
- Record created or updated — watch any object and fire for each new or changed record (new Leads, updated Opportunities, and so on).
- New file attached to a record — fire when a file is newly attached to a record of a type you choose.
- New file version attached to a record — fire when a new version of a file is uploaded, not only brand-new files.
The two file modes are guided templates: they hide Salesforce's ContentDocument / ContentVersion / ContentDocumentLink layering behind a single "a file was attached to a <record>" choice. See File triggers below.
How "changed" is decided
In Record mode the trigger tracks a timestamp cursor and fetches records whose cursor field is greater than the last one it processed. Choose which field to watch with Trigger on:
- Created (new records only) — uses
CreatedDate; fires only for newly created records. - Modified (created or updated) — uses
SystemModstamp; fires for both creates and updates.SystemModstampis indexed and also advances on system-driven updates, making it the reliable choice for catching all changes.
Records are ordered by the cursor (with the record ID as a tiebreak) so none are missed when several share a timestamp. The file modes poll by file creation time instead and have no Trigger on option.
Deletes are not detected — a deleted record simply stops appearing. If you need delete or true real-time events, use Salesforce Change Data Capture or an Outbound Message into a Webhook Trigger instead.
Parameters
| Parameter | Description | Required |
|---|---|---|
| Credential | Salesforce credential (org) to poll | Yes |
| Trigger | What to watch: record changes, new files, or new file versions | Yes |
| Object (record mode) | The Salesforce object to watch | Yes |
| Attached to (file modes) | The object type a file must be attached to (e.g. Account) | Yes |
| Fields & relationships | Fields (and related records) to include — of the triggered record (record mode), or of the attached record (file modes) | No |
| Filters (record mode) | Only trigger on records matching these conditions (ANDed) | No |
| Trigger on (record mode) | CreatedDate (new) or SystemModstamp (created/updated) | Yes |
| Poll Interval | How often to check for changes (minutes) | Yes |
| Limit | Maximum items to process per poll (1-100) | Yes |
Filtering
Filters narrow which records fire the trigger — each poll only returns records matching every condition (combined with AND), on top of the timestamp cursor. Pick a Field, an Operation, and a Value.
Filters and Fields & relationships behave exactly as in the Salesforce (query) node, including polymorphic relationships: a lookup that can point at multiple object types (like ContentDocumentLink.LinkedEntity) is only expandable once you fix its type with a <Relationship>.Type filter.
File triggers
The New file attached to a record and New file version attached to a record modes watch for files without you touching Salesforce's file objects directly.
- Pick Attached to — the object type the file must be attached to (e.g.
Account). The trigger only fires for files linked to a record of that type; files attached to anything else are ignored. - In Fields & relationships, choose which fields (and related records) of that attached record to include on each item — the same picker as the query node, polymorphic relationships included.
Each fired item is one file, shaped like this:
{
"data": {
"file": { "...": "the file itself — flows straight into Data Extractor, etc." },
"ContentDocument": { "Id": "069...", "Title": "invoice", "FileExtension": "pdf", "ContentSize": 12345 },
"Account": { "...": "the attached record, with the fields you selected" }
}
}
The attached record is keyed by its object type (Account above). In New file version mode the file key is ContentVersion (carrying VersionNumber) instead of ContentDocument, and the trigger fires for each new version rather than only the first upload.
You can still watch files in Record mode by setting Object to ContentDocumentLink and filtering LinkedEntity.Type equals Account (see polymorphic relationships). The file modes above are the simpler, guided equivalent and are preferred.
Notes
The connected user only sees records their profile and sharing rules permit, so a limited-access credential will under-report changes. Use an appropriately-privileged integration user for change triggers.