Salesforce triggers

Query trigger

A query trigger continuously runs the same Salesforce Object Query Language (SOQL) Query and generates results one-by-one. Use SOQL to search your organization’s Salesforce data for specific information. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce data. A trigger allows you to interact with your data using SOQL.

Expected config fields

  • SOQL Query - Input field for your SOQL Query

  • Output method - dropdown list with options: Emit all - all found records will be generated in one array records, and Emit individually - each found object will be generated individual. Optional field, defaults to: Emit individually.

Query trigger - configure input

SOQL query input example

SELECT id, Name, Phone, Birthdate, Likes_Ice_Cream
FROM Contract
WHERE Phone != null
Max possible fetch size is 2000 objects per execution.

Get new and updated objects polling trigger

Polls existing and updated objects. You can select any custom or built-in object for your Salesforce instance.

Input field description

  • Object - Input field where from which to select the type of object updates to retrieve. E.g. Account;

  • Start Time - Indicates the beginning time to start polling from. Defaults to 1970-01-01T00:00:00.000Z;

  • End Time - If provided, do not fetch records modified after this time;

  • Size of Polling Page - Indicates the size of pages to be fetched. You can set this to positive integer up to 10,000, where the default is 1000;

  • Process single page per execution - You can select on/off options (where the default is yes):

    • yes - if the number of changed records exceeds the maximum number of results in a page, wait until the next flow start to fetch the next page;

    • no - if the number of changed records exceeds the maximum number of results in a page, the next pages will fetching in the same execution.

  • Include linked objects - Multiselect dropdown list with all the related child and parent objects of the selected object type. List entries are given as Object Name/Reference To (Relationship Name). Select one or more related objects, which will be join-queried and included in the response from your Salesforce Organization. Refer to the Limitations section below for use case advisories.

  • Output method - Dropdown list with the options: Emit all - all found records will be generated in one array records, and Emit individually - each found object will be generated individually. Optional field, defaults to: Emit individually.

  • Max Fetch Count - Limit for a number of messages that can be fetched. 1,000 is the default value when the variable is not set.

For example, you have 234 “Contact” objects, 213 of them were changed from 2019-01-01. You want to select all “Contacts” that were changed from 2019-01-01, set the page size to 100 and process single page per execution.

For you purpose you need to specify following fields:

  • Object: Contact

  • Start Time: 2019-01-01T00:00:00.000Z

  • Size of Polling Page: 100

  • Process single page per execution: yes (or leave this empty)

Get New and Updated Objects Polling - configure input

As a result, all contacts will be fetched in three calls of the trigger: two of them by 100 items, and the last one by 13. If you select no in Process single page per execution, all 213 contacts will be fetched in one call of the trigger.


When a binary field (primitive type base64, e.g. Documents, Attachments, etc) is selected on Include linked objects, an error will be thrown:

MALFORMED_QUERY: Binary fields cannot be selected in join queries. Instead of querying objects with binary fields as linked objects (such as children Attachments), try querying them directly.

There is also a limit to the number of linked objects that you can query at once - beyond two or three, depending on the number of fields in the linked objects, Salesforce could potentially return a Status Code 431 or 414 error, meaning the query is too long.

Last, due to a bug with multiselect dropdowns, it is recommended to deselect all of the elements in this field before you change your selection in the Object dropdown list.

Subscribe to platform events trigger

This trigger (which operates on realtime flows only) will subscribe for any platform Event using the Salesforce streaming API:

Subscribe to platform events trigger

Input field description

  • Event object name - Input field where you should select the type of platform event which you want to subscribe E.g. My platform event

How to create new custom platform event entity

Setup --> Integrations --> Platform Events --> New Platform Event

Platform Events

Learn more about this in Salesforce’s Platform Events Intro Documentation.

Environment variables

  1. SALESFORCE_API_VERSION - API version for not deprecated actions and triggers e.g. 46.0, default value 45.0.

  2. LOG_LEVEL - trace




    error controls logger level


At the moment this trigger can be used only for "Realtime" flows.