Skip to content

Operation

Starts when an operator submits this operation’s form. File upload fields are optional.

@lainstack/operation/submitted-trigger · Triggers

Key @lainstack/operation/submitted-trigger (“Operation”). Starts a run when an operator submits the operation’s form in the app. Choose it when a person starts the work and gives typed input or files. Use @lainstack/api/invoke-trigger for system input.

References use the type key @lainstack/operation/submitted-trigger as the source blockId, never the block instance id.

Form: up to 24 fields (text, textarea, number, boolean, date, select) and up to 16 uploadFields. Field keys start with a letter and use letters, digits and “_”. Keys must be unique within their group.

Payload leaves:

  • payload.data.formValues.<fieldKey>: one leaf per form field, typed by the field type. Date and select values are text.
  • payload.data.uploads.<uploadKey>: the files for each upload field.
  • payload.system.automationId, payload.system.submissionId, payload.system.receivedAt.

Traps:

  • Fields are optional unless required is true. Mark fields required if later blocks need them.
  • Renaming a field key changes the reference path. Update the blocks that use it.
  • Upload fields allow up to 50 files, set by minFiles and maxFiles.
  • A test run takes trigger data from a pinned sample (testing).
Setting Key Type Details
Operation name formTitle Text Title of the run form. Leave empty to use the automation name. At most 120 characters.
Operation description formDescription Text Optional context shown before the operator submits. At most 400 characters.
Output Path Type
Automation Id payload.system.automationId Text
Submission Id payload.system.submissionId Text
Received At payload.system.receivedAt Text