Skip to content

Triggers

A trigger is the block an automation starts from. Every run begins at a trigger, and the trigger’s output is the first data the rest of the automation can use.

A trigger starts real runs only after the automation is published. Until then you can run the draft from the editor with a sample input, but its webhook has no live endpoint, its schedule does not tick and it is not listed under Operations. See Build your first automation.

An automation can have several triggers, at most one of each type. Each trigger leads to its own first block, so the same automation can, for example, run on a schedule and also from a webhook.

Two triggers on one automation. Each starts at its own first block; both paths can meet later.
Trigger Starts a run when
Webhook Another system sends an HTTP request to the automation’s URL.
Schedule A time you set comes round.
Email received A new email arrives in a connected mailbox.
Operation Someone fills in the automation’s form under Operations.
Called by an automation Another automation runs it with the Run automation block.
Agent work item An agent picks up a chat, an assigned item or a watched item.

Each block page lists every setting and output. The sections below cover how each trigger behaves.

The editor shows this trigger as API Invoke. Another system starts a run with:

POST https://<your Lainstack host>/api/automation/invoke/<endpoint key>
  • Authentication: an API key (the default) sent in the x-automation-api-key header or as a bearer token, an HMAC SHA-256 signature, or none. Signed requests carry x-automation-signature and an x-automation-timestamp within 5 minutes of now.
  • Response: the call returns 202 Accepted with an event ID as soon as the run is queued. The caller does not wait for the run and never receives its result. A repeated request that Lainstack recognizes returns 200 instead of starting a second run.
  • Body: JSON, XML, raw text or multipart. Inline bodies are capped at 1 MiB, so send files as multipart. You can check the body against a list of fields or an XSD; a body that does not match is rejected and no run starts.
  • Limits: an optional IP allow list, and rate and concurrency limits that answer 429 when exceeded.

Pick hourly, daily, weekly or monthly, or switch to a five-field cron expression. The default is daily at 09:00 UTC. Set a time zone by its IANA name, such as Europe/Paris. If a run is still going when the next one is due, the default is to skip that tick; you can instead keep one tick waiting.

This trigger watches a mailbox through a connection and starts one run per new email, checking about once a minute. It has no filter, so filter inside the automation. The email arrives as a file that later blocks can read.

An operation is a form that people in the workspace fill in to start a run. You design the form on the trigger: up to 24 fields (text, long text, number, yes or no, date, choice) and up to 16 file uploads. Give it an Operation name and Operation description, or the automation’s name is used.

Published automations with this trigger appear under Operations in the workspace rail, where anyone with access can open the form and submit it.

This trigger lets one automation run another, like a function. It has no URL, schedule or form. Declare the inputs it accepts and the values it returns on the trigger, then call it from another automation in the same workspace with the Run automation block. The caller waits for the result and continues on its completed or failed exit.

  • Calls cannot loop back on themselves and cannot nest more than 3 levels deep.
  • One run can make at most 100 calls.
  • If you change the inputs or outputs in a way that breaks a caller, that caller’s next call fails instead of passing the wrong data.

This trigger connects an automation to an agent in the workspace. It starts when the agent picks up a chat, an assigned item or something it watches.

Last updated: