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.
Triggers fire only when published
Section titled “Triggers fire only when published”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.
More than one trigger
Section titled “More than one trigger”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.
The triggers
Section titled “The triggers”| 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.
Webhook
Section titled “Webhook”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-keyheader or as a bearer token, an HMAC SHA-256 signature, or none. Signed requests carryx-automation-signatureand anx-automation-timestampwithin 5 minutes of now. - Response: the call returns
202 Acceptedwith 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 returns200instead 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
429when exceeded.
Schedule
Section titled “Schedule”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.
Email received
Section titled “Email received”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.
Operation
Section titled “Operation”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.
Called by an automation
Section titled “Called by an automation”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.
Agent work item
Section titled “Agent work item”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.
- Runs: what happens after a trigger fires.
- Connections and credentials: needed by Email received.