Triggers

Have a Coworker run work on its own, on a schedule, once at a set time, or when another system calls a web address.

For: A Coworker's Supervisor, and admins · Last updated

A trigger lets a Coworker do a piece of work without anyone starting a chat. You give it an instruction, and the Coworker carries it out each time the trigger fires.

Triggers are managed from the Triggers card on the Coworker's details page. The card is shown to the Coworker's Supervisor and to admins, who see every trigger on that Coworker. Open the details page from the roster with Details.

Trigger types#

Type When it runs
Schedule (cron) Repeatedly, on a schedule you write.
One time Once, at a date and time you choose.
Webhook Whenever another system calls the trigger's web address.

Add a trigger#

  1. On the Triggers card, select Add trigger.
  2. Choose the Trigger type.
  3. Fill in the details for that type:
    • For Schedule (cron), enter the Schedule as a five-field cron expression, for example 0 9 * * 1 for 9:00 every Monday, and choose a Timezone from the list. A schedule that is not valid is refused with a message.
    • For One time, choose the date and time in Run at.
    • For Webhook, there is nothing else to fill in. A unique web address is created when you add the trigger.
  4. In What should it do when this fires?, write the instruction the Coworker will carry out. It is required.
  5. Select Add trigger. Select Cancel to close the form without saving.

Reading the list#

Each trigger shows its schedule (and timezone), its run time if it is one time, or Webhook. Below it are the instruction you wrote and its state: Scheduled or Paused, with when it last ran.

What you can do with a trigger#

  • Fire now runs the trigger immediately, whatever its schedule.
  • Pause stops it from running. Resume turns it back on.
  • Delete removes it after you confirm in the Delete this trigger window. Select Delete trigger. This cannot be undone.
  • Recent runs opens the latest runs; Hide runs closes the list.
  • Regenerate URL appears on webhook triggers only. See below.

A one-time trigger runs once and then shows as Paused.

Runs#

Each time a trigger fires, the Coworker starts a conversation titled "Trigger:" followed by the beginning of your instruction. Select Recent runs on the trigger to see the latest runs, with the date and time of each. Select a run to open its conversation in Chat.

Trigger runs are kept apart from your own chats and do not appear in your conversation list. A run started by a schedule is attributed to the Coworker's Supervisor. A run started with Fire now, or by a webhook call, is attributed to the person who started it.

Webhook triggers#

A webhook trigger shows its web address in a field, with a Copy button that changes to Copied once the address is on your clipboard. Give the address to the other system that should start the work.

Calls to the address must carry the personal API key of someone who is allowed to chat with the Coworker. Create and manage your key under Settings in My API Keys. A call with a missing or invalid key is refused. A call to a paused trigger is refused too.

To replace the address, select Regenerate URL and confirm in the Regenerate this webhook URL window. The old address stops working immediately, and any system using it needs the new one.