Mistral Workflows - Triggers Plugin
Typed models for workflows started by triggers.
A trigger links an event source (for example a GitHub or Slack webhook) to a workflow. When the source receives an event that matches the trigger's filter, the Workflows API starts the workflow asynchronously, passing the webhook request as input. Signature verification happens before the workflow starts, and the workflow's return value is not sent back to the webhook caller.
Install
pip install mistralai-workflows-plugins-triggers
It requires mistralai-workflows>=3.0.0,<4.0.0 and Python >=3.12,<3.15.
Maturity and limits
- Alpha: models and module layout can change between releases without a deprecation period. Pin an exact version.
- The models describe the payload sent by the trigger system only. Workflows behind the legacy
/v1/workflows/webhooks/{name}route keep using the webhook plugin. - Provider models cover the events listed in Provider events; other events validate as the
provider's
EventReceivedwith an untyped body. - The workflow's return value is not sent back to the webhook caller: the plugin cannot answer a webhook synchronously (e.g. a Slack interaction response).
Quick Start
from pydantic import BaseModel
import mistralai.workflows as workflows
from mistralai.workflows.plugins.triggers import TriggerEvent
class PushBody(BaseModel):
ref: str
@workflows.workflow.define(name="on-github-push")
class OnGithubPush:
@workflows.workflow.entrypoint
async def run(self, event: TriggerEvent) -> None:
if event.header("x-github-event") != "push":
return
push = event.parse_body(PushBody)
...
Then create a trigger targeting the on-github-push workflow.
TriggerEvent
| Field | Description |
|---|---|
method |
HTTP method of the webhook request |
headers |
Request headers, with lowercase names and credential headers stripped |
query_params |
Query string parameters |
body |
Body parsed as JSON, or None if empty or not valid JSON |
raw_body |
Body decoded as UTF-8, or None if empty |
Unknown fields are ignored, so workers keep accepting payloads when the API adds new ones.
For custom webhooks, parse the body inside the workflow with parse_body rather than typing the entrypoint with a
strict model: the API validates the input against the workflow's input schema before starting it, so a payload that
does not match is rejected without any execution to inspect.
Provider events
The github, slack, linear, notion and lucca modules each expose an Event class to use as the entrypoint type. It validates
into the subclass matching the payload, a TriggerEvent whose body is a provider model, so the request fields stay
available.
from mistralai.workflows.plugins.triggers import github
@workflows.workflow.define(name="on-github-event")
class OnGithubEvent:
@workflows.workflow.entrypoint
async def run(self, event: github.Event) -> None:
match event:
case github.PullRequestOpened(body=body):
...
case github.IssueCommentCreated(body=body):
...
case _:
return
- Every event class registers the permissive
TriggerEventinput schema, so the API starts the workflow for every event and the dispatch happens on the worker. - Events without a dedicated model validate as the provider's
EventReceived. A known event with a malformed body raises a pydanticValidationError: like any workflow-level error, it fails the workflow task, which Temporal retries, and the execution shows the error. - Events keep their class when serialized and validated again as
Event, e.g. when passed to an activity. - A workflow taking a generic
TriggerEventcan still get the typed event withgithub.Event.model_validate(event). - The entrypoint can take a single event class (e.g.
event: github.PullRequestOpened) or a family class (e.g.event: github.PullRequestEvent, any pull request action). It is parsed like throughEvent, and a payload of another event raises aValidationError(Expected PullRequestOpened, got PullRequestClosed): filter the trigger so that it only fires for that event.
| Module | Event type taken from | Events |
|---|---|---|
github |
X-GitHub-Event header and body action |
<Event><Action> for every action of pull_request, pull_request_review, pull_request_review_comment, issue_comment and check_run (e.g. PullRequestOpened, PullRequestReviewRequested, CheckRunCompleted), each a subclass of its family's <Event>Event (e.g. PullRequestEvent); Push |
slack |
Events API event.type / subtype, the interaction type, or the slash command command |
MessagePosted, MessageEdited, MessageDeleted, MessageOther, ReactionAdded, ReactionRemoved, AppMentioned, MemberJoined, AgentSessionStopped, BlockActions, ViewSubmission, ViewClosed, SlashCommand, AppRateLimited |
linear |
Body type and action |
IssueCreated, IssueUpdated, IssueDeleted, IssueCommentCreated, IssueCommentUpdated, IssueCommentDeleted, ProjectUpdated, AgentSessionCreated, AgentSessionPrompted |
notion |
Body type |
Page{Created,PropertiesUpdated,ContentUpdated,Moved,Deleted,Undeleted,Locked,Unlocked}, PageTranscriptionBlockTranscriptDeleted, Database{Created,ContentUpdated,Moved,Deleted,Undeleted,SchemaUpdated}, DataSource{Created,ContentUpdated,Moved,Deleted,Undeleted,SchemaUpdated}, Comment{Created,Updated,Deleted}, FileUpload{Created,Completed,Expired,Failed}, View{Created,Updated,Deleted} |
lucca |
Body topic |
<Resource>{Created,Updated,Deleted} for LegalEntity, BusinessEstablishment, Department, Employee, EmployeePersonalRecord, Employment, JobPosition, JobQualification, OccupationCategory, EmployeeAttribute |
The github module is generated from GitHub's OpenAPI description by scripts/generate_github_models.py: don't
edit it by hand, change the generator and run make generate-github-models. CI fails if the module is stale. GitHub
spells out every nested object at each place it is used: the generator merges those copies into one class per object
(User, Repository, PullRequest, ...), with a field required only when GitHub always sends it.
Notion and Lucca send a thin envelope (the changed resource's id and URL): fetch the full resource from their API.
Slack interactions and slash commands are delivered form-encoded: for BlockActions, ViewSubmission, ViewClosed
and SlashCommand, body is the decoded payload and raw_body keeps the original form body.
Metadata
Release files for mistralai-workflows-plugins-triggers 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mistralai_workflows_plugins_triggers-0.1.0.tar.gz | 48.9 kB | With provenance | Details for mistralai_workflows_plugins_triggers-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mistralai_workflows_plugins_triggers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mistralai_workflows_plugins_triggers-0.1.0-py3-none-any.whl |
Total release size: 75.8 kB
Release files / mistralai_workflows_plugins_triggers-0.1.0.tar.gz
| Download URL | mistralai_workflows_plugins_triggers-0.1.0.tar.gz |
|---|---|
| Size | 48.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79f6320081661b8c863f8f84d263e23c979b5a1fae12d9a95543d2ffa74abc73
|
|
BLAKE2b-256 checksum How to use checksums |
7c5b0fdb5f15fab441ae1d01338a41702dd72eba5d368889c30357513daa0bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / mistralai_workflows_plugins_triggers-0.1.0-py3-none-any.whl
| Download URL | mistralai_workflows_plugins_triggers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3335d225654703b0341105670420a28b910402cce699dbb6830dfcea23d9736
|
|
BLAKE2b-256 checksum How to use checksums |
ea555aa1932de0c9a0ca49baf32f1dfba4a7afdba94657f7a88d6bca028a9e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for mistralai-workflows-plugins-triggers 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mistralai_workflows_plugins_triggers-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.