Webhook
Starts when an external system sends an HTTP request to this automation’s webhook URL.
@lainstack/api/invoke-trigger · Triggers
How to use it
Section titled “How to use it”Key @lainstack/api/invoke-trigger (“Webhook”). Starts a run when an external system sends an HTTP request to the automation’s webhook URL. Choose it for system-to-system input. Use @lainstack/time/cron-trigger for schedules and @lainstack/operation/submitted-trigger for people.
References use the type key @lainstack/api/invoke-trigger as the source blockId, never the block instance id.
Payload leaves:
payload.data.<field>: the request body fields, typed by the generatedinputValueSchema. WithinputSchemaKindnone the data is untyped. With json_schema or xsd, edit the schema source; the typed shape is generated from it.payload.attachments: uploaded files (up to 64).payload.system.endpointKey,payload.system.contentType,payload.system.receivedAt.payload.system.rawBody: the raw text of an XML body.
Traps:
- Only a published automation has a live endpoint.
- The caller gets HTTP 202 at once with an event id. It never receives the run result. A repeat delivery can return “deduped” (HTTP 200) and start no second run.
- The endpoint checks caller authentication and an optional IP allow-list, and applies run rate limits.
- Bodies sent inline (JSON, XML, raw) are limited to 1 MiB. Send files as multipart parts.
- With json_schema or xsd, a body that does not match the schema is rejected and no run starts.
- A test run takes trigger data from a pinned sample (
testing).
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Generated input shape (required) | inputValueSchema |
Value | Generated from the webhook input schema. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| Attachments | payload.attachments |
Value |
| Endpoint Key | payload.system.endpointKey |
Text |
| Raw Body | payload.system.rawBody |
Text |
| Content Type | payload.system.contentType |
Text |
| Received At | payload.system.receivedAt |
Text |