Mistral WorkflowEvents

Mistral WorkflowEvents

Certified

Trigger on Mistral Workflow events

Polls the Mistral Workflows event list endpoint on a fixed interval and emits one Kestra execution per matched event.

Note: Mistral Workflows is currently in public preview.

On the first poll (no cursor stored), the trigger fetches the current event page, stores the next_cursor, and emits nothing — this avoids flooding Kestra with historical events. From the second poll onwards, only new events are returned and filtered against eventTypes and workflowName.

yaml
type: io.kestra.plugin.mistral.WorkflowEvents

Trigger a Kestra flow on Mistral Workflow completion events

yaml
id: react_to_mistral_workflow
namespace: company.team

triggers:
  - id: workflow_completed
    type: io.kestra.plugin.mistral.WorkflowEvents
    apiKey: "{{ secret('MISTRAL_API_KEY') }}"
    workflowName: "my-summarization-workflow"
    eventTypes:
      - WorkflowExecutionCompleted
      - WorkflowExecutionFailed
    interval: PT30S

tasks:
  - id: log_event
    type: io.kestra.plugin.core.log.Log
    message: "Workflow {{ trigger.workflowExecId }} ended with event {{ trigger.eventType }}"
Properties
Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

API key

Bearer token for the Mistral API; keep in a secret variable.

Defaulthttps://api.mistral.ai/v1

Base URL

API base URL; defaults to https://api.mistral.ai/v1.

SubTypestring
Default["WorkflowExecutionCompleted","WorkflowExecutionFailed","WorkflowExecutionCanceled"]

Event types filter

List of event types to emit executions for. Defaults to terminal execution events: WorkflowExecutionCompleted, WorkflowExecutionFailed, WorkflowExecutionCanceled. Other available types include WorkflowExecutionStarted and task-level events.

DefaultPT30S
Formatduration

Poll interval

How often to poll the Mistral event list endpoint. Defaults to PT30S.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

Workflow name filter

Optional workflow name to filter events. When omitted, events from all workflows are considered.

Attributes

Raw JSON of the full event payload.

Event timestamp

Unix epoch milliseconds when the event was emitted.

Event type

The event type (e.g. WorkflowExecutionCompleted, WorkflowExecutionFailed).

Workflow execution ID

The ID of the Mistral workflow execution that produced the event.

Workflow name

The name of the workflow that produced the event.