maton trigger create

maton trigger create --source <source> --event-type <type> [flags]

Create a trigger that subscribes to a source’s events of a given type. Attach destinations now with repeatable –destination flags, or later with maton trigger destination create. A trigger with no destination is pull-only: its events are stored and listable but not delivered.

Each source emits its own event types: time schedule.elapsed google-mail email.received slack channel_message.received, direct_message.received, reaction.added notion page.created, page.content_updated, comment.created stripe charge.succeeded, invoice.paid, subscription.created, subscription.canceled, invoice.payment_failed hubspot contact.created, contact.deleted, contact.updated, company.created, company.deleted, company.updated, deal.created, deal.deleted, deal.updated, deal.stage_changed, ticket.created, ticket.deleted, ticket.updated linear issue.created, issue.status_changed, issue.opened calendly invitee.created, invitee.canceled, invitee_no_show.created github pull_request.opened, pull_request.merged, branch.pushed, release.published

Options

--connection-id <string>
Connection ID used to subscribe
--description <string>
Description
--destination <stringArray>
Destination as a JSON object (repeatable)
--event-type <string>
Event type to subscribe to (required)
-q, --jq <expression>
Filter JSON output using a jq expression
--json <fields>
Output JSON with the specified fields
--name <string>
Human-readable name
--parameter <stringArray>
Trigger parameter key=value pair (repeatable)
--source <string>
Source app the trigger subscribes to (required). One of: time, google-mail, slack, notion, stripe, hubspot, linear, calendly, github
-t, --template <string>
Format JSON output using a Go template; see "maton help formatting"

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

JSON Fields

connection_id, created_at, description, destinations, event_type, name, parameters, reason, source, status, trigger_id, updated_at

Examples

$ maton trigger create --source github --event-type pull_request.opened --connection-id conn_123
$ maton trigger create --source github --event-type pull_request.opened \
    --parameter repo=maton-ai/cli \
    --destination '{"url":"https://httpbin.org/post","method":"POST","name":"prod"}'

See also