Example requests
- “When someone posts a top-level message in #support, run the triage workflow with the message text and author.”
- “When a Stripe payment of $100 or more succeeds, start the thank-you workflow.”
- “When an issue is opened in our main repo, have the triage agent label it.”
- “Whenever the Major app is mentioned in Slack, run the Q&A workflow.”
Supported connectors
Events are available for Slack, Stripe, GitHub, Gmail, Outlook Mail, Outlook Calendar, Google Calendar, Google Drive, Attio, and Linear, as well as many other connectors from the connector catalog. For example:
The connector must already be connected and configured in your organization. Ask the Platform Agent which events a connector supports and what their payloads contain; it looks them up rather than guessing.
Linear
Linear events are named<resource>.<action>, where the action is create, update, or remove. The resources are issue, comment, issue_label, reaction, project, project_update, cycle, document, initiative, initiative_update, customer, and customer_need.
- Linear only lets workspace admins create webhooks. Set the Linear connector’s permissions to Admin and connect it as a Linear workspace admin. Publishing fails on a connector set to Read Only or Read & Write, or one connected by someone who isn’t a workspace admin.
- On a per-user Linear connector, the person who publishes the workflow must be a workspace admin who connected with Admin permissions.
- The trigger covers every public team in the workspace. Events from private teams aren’t delivered.
GitHub with your own GitHub App or GitHub Enterprise
GitHub connectors that use Major’s managed GitHub App need no setup for triggers. If the connector uses your own GitHub App, which every GitHub Enterprise connector does, set up the App’s webhook before you publish a workflow with a GitHub trigger:- Open the GitHub connector’s settings in Major and find the Triggers section. It shows the connector’s webhook URL.
- In your GitHub App’s settings, under Webhook, check Active and set Webhook URL to that URL.
- Set a webhook secret in GitHub, then paste the same secret into the Triggers section in Major and save.
- In the GitHub App, select the event types that can trigger Major workflows.
If the secret in GitHub doesn’t match the one saved in Major, deliveries are dropped without an error, so GitHub’s Recent Deliveries still shows them as successful. If a trigger never fires, check the secret first.
How a connector event trigger is defined
In the workflow editor, add a trigger, choose Connector event, pick the connected connector, and select events from the list. Some catalog connectors take one event per trigger and show extra Event options for it. For Outlook Calendar, a Calendar dropdown lists the account’s calendars; leave it on Default calendar to follow the account’s default.
Outlook Calendar event payloads include
changeType (created, updated, or deleted) and calendarId. A deleted event can no longer be read from Microsoft, so its payload has only id, changeType, and calendarId.
The event object
The filter and the input projection both see a singleevent object:
The filter and projection can’t see workflow nodes or
trigger, because they run before the workflow starts.
Filtering events
Put every deterministic condition, such as channel, amount, repository, or subtype, inoptions.filter instead of starting a run for every event and having an agent ignore the ones you don’t want. Events that don’t match never start a run.
The filter is a boolean CEL expression. Guard optional fields with in or has() before reading them.
Shaping the input
By default, the wholeevent.json object becomes trigger.input, so a Slack message’s fields are available as trigger.input.text, trigger.input.channel, and so on.
Set input to pass only what the workflow needs, or to rename fields. Each value is either a JSON literal or { "$expr": "..." }:
input applies to every event the trigger subscribes to; there are no per-event overrides. {{ }} string interpolation isn’t supported here, so use $expr.
If the workflow has an input_schema, the projected input is validated against it. When a filter or projection fails to evaluate, or the input fails validation, the run is recorded as failed with the reason, and no nodes run.
Per-user connectors
Per-user connectors such as Gmail, Google Calendar, Outlook Mail, Outlook Calendar, and Slack (Personal) can back a connector event trigger on any workflow. The trigger watches the account of the person who published (deployed) the workflow, the same identity its runs act as. For example, a Gmail trigger watches the deployer’s mailbox, and a Slack (Personal) trigger fires only for messages in conversations the deployer is in. When someone else takes over and republishes the workflow, the trigger moves to the new deployer’s account. If the new deployer hasn’t connected that account yet, the trigger shows an error in its settings until they sign in.Publishing
Connector event subscriptions are created when you publish the workflow, and removed when a publish drops the trigger. Until then the trigger is inert. Use Run now with sample input to test the workflow first. Deleting a connector also tears down every connector event trigger that listens to it, and the trigger stops starting runs. Events that still arrive for a deleted connector are ignored.Next steps
Webhooks
Start a workflow from your own systems with an authenticated call.
State and input
Use
trigger.input in your nodes.