Logic

Event triggers

An event trigger runs a function automatically: when something happens on your platform, or at the times you schedule.

Events you can use

Subscription activated, renewed, tier changed

A subscription starts, renews or moves to another plan.

Subscription cancellation scheduled, resumed

A subscriber cancels at the end of the period, or takes that back.

Subscription payment failed, ended

A renewal payment fails, or the subscription ends.

User created

A new user account is created.

On a schedule

The clock. See Scheduled triggers below.

Each trigger connects one event to one function. A function can have several triggers.

Attach a function to an event

1

Build and test the function

Test it first on its Test tab.

2

Open the Triggers tab

It is titled What runs this function. Click Attach to an event.

3

Choose the Event

Add a Label that says what the trigger does, such as Send the welcome email.

4

Narrow it if needed

For subscription events, Only run for limits it to user subscriptions or row subscriptions, and Limit to one table narrows row subscriptions further.

5

Save

The function runs the next time that event happens.

Once saved, the trigger runs your function on live events by itself. Test the function first.

Read the event in your function

Add the matching node from the Events category: Subscription Event, User Created Event or Scheduled Event. Open it and choose the Fields to expose. Each field becomes an output port.

A field the event does not carry arrives empty rather than failing. On the Test tab, Load a sample payload fills in realistic event data, and Use a real subscription loads a real one so query nodes find the row.

Scheduled triggers

Every few minutes

Every 1 to 44640 minutes, counted from the previous run so it does not drift.

Every day / On chosen weekdays

At a time you pick, on every day or on the days you choose.

Once a month

On a day of the month. A shorter month runs on its last day.

Once

At a date and time you pick, then it stops.

Timezone

Times of day are read in this zone.

Once per row of

Optional. A SELECT query: the function runs once for each row, receiving that row, up to Most rows per run (50 at most).

The query must be active and must not need a required parameter. Filter it so finished rows drop out, or they are processed on every run.

How runs behave

Only an active trigger whose function is also active runs.

Each run has its own database transaction, a 10 second limit and no signed-in user. Its queries run as the system, which passes query security like an admin.

Scheduled runs start within about 30 seconds of their time. A run missed while the server was down runs once when it is back.

The Schedule column shows the next run and how the last one went.

Pause a trigger by changing its Status. Delete removes it for good, while its past runs stay in the run history.