Salesforce Trigger
Trigger workflows when a Salesforce record is created or updated.
Overview
Start a workflow when a Salesforce record is created or updated. Choose an object — Account, Contact, Lead, Opportunity, Case, Task, or a Custom Object — and whether to fire on new records only, or on any create or update.
How it works
- The trigger polls Salesforce on a schedule (every few minutes) with a SOQL query.
- Record created filters on
CreatedDate; Record created or updated filters onLastModifiedDate. - Each poll returns records changed since the last check, oldest first, so nothing is missed between runs.
- Use Fields to Return to control which field API names come back (Id is always included).
Trigger output ($json)
{{$json.Id}}— the record Id{{$json.resource}}— the object (contact, lead, …){{$json.event}}—record_createdorrecord_updated{{$json.Name}}and any other returned field{{$json.CreatedDate}}/{{$json.LastModifiedDate}}
Notes
- In created or updated mode, editing a record re-fires the trigger. Branch on a field if you only want to act on certain changes.
- For Custom Objects, set the API name (e.g.
MyObject__c) and request its field API names.