Documentation

Listeners and Time Triggers

Listeners and time triggers are two ways to run actions automatically. A listener runs actions when something happens in Qik, such as a profile being created or an event starting. A time trigger runs actions on a schedule, such as every Monday at 9am. Both are found in the Developer section of the sidebar.

Listeners

Listeners are the "when X happens, do Y" of the platform.

Creating a listener

  1. Open Developer from the sidebar.
  2. Under Listeners, click New Listener.
  3. Give it a clear title.
  4. In System Events, choose one or more events to listen for.
  5. In Actions, choose the action(s) to run when any of those events fires.
  6. Make sure Enabled is switched on, then save.

System events

Every content type in your organisation, including your own content types and forms, offers these events:

  • is created: a new item is created.
  • is edited: an item is changed.
  • is deleted: an item is moved to the trash.
  • is restored: an item is restored from the trash.
  • is erased: an item is permanently erased.

Some types have extra events:

  • Events: starts, ends, Doors open, Doors close.
  • Logins: invitation is accepted, invitation is rejected, signs up, logs in.
  • Users: signs up, logs in.
  • Emails: recipient unsubscribes, recipient resubscribes.

Each option shows its event key in brackets, for example profile.create. When the event fires, the action receives the affected record's id in input.item along with details of the event.

Pausing a listener

Switch off Enabled to stop a listener firing without deleting it. This is useful while you debug its action or pause an automation for a while.

Time triggers

Time triggers run actions on a recurring schedule.

Creating a time trigger

  1. Open Developer from the sidebar.
  2. Under Time Triggers, click New Time Trigger.
  3. Give it a clear title.
  4. Set the schedule (see below).
  5. In Actions, choose the action(s) to run each time.
  6. Save. Qik calculates the Next Trigger Date for you.

Schedule options

  • Unit: Minute, Hour, Day, Week, Month or Year.
  • Every: how many units between runs, for example every 2 weeks.
  • Time of Day and Timezone: for Day, Week, Month and Year schedules, the hour to run and the timezone to use. If you leave the timezone empty, your organisation's timezone is used.
  • Weekday: for weekly schedules, the day of the week.
  • On the: for monthly schedules, either Same Date (with a Specific Date such as the 1st or 15th) or First, Second, Third, Fourth, Fifth or Last plus a weekday, for example "the first Monday of every month".

Minimum interval

The shortest schedule is every 15 minutes. Qik rejects a Minute schedule with a smaller number. For most jobs, hourly or daily is plenty.

How it runs

Each time trigger has a Next Trigger Date. Once that time has passed, Qik runs the trigger's actions and moves the Next Trigger Date on to the following run. Changing the schedule recalculates it. A trigger keeps running until you archive it or delete it; archived (inactive) time triggers do not run.

Use cases

  • Weekly report: every Monday at 9am, run an action that compiles figures and emails a summary.
  • Data clean-up: nightly, archive stale records or fix incomplete data.
  • External sync: every hour, push or pull data from another system.
  • Welcome message: when a login accepts its invitation, send a welcome email.
  • Post-event follow-up: when an event ends, send attendees a feedback form.

For "when an item of this one type is created or updated", the automations on the content type itself are often simpler. See Definition Automations. To remind rostered people before an event, use the roster's own reminder settings rather than a time trigger.

Best practices

  • Test the action first using its test panel, before connecting it to a listener or trigger.
  • Read the record from input.item. Actions started by listeners and time triggers do not receive a request body.
  • Give the action permissions. Actions start with none, whatever starts them.
  • Use descriptive names so the purpose of each listener and trigger is obvious.
  • Pause instead of deleting: switch off Enabled on a listener, or archive a time trigger.

FAQs

What's the difference between a listener and a time trigger?
Can a listener run several actions?
What happens if a time trigger's action fails?
Can I run something every 5 minutes?