Maton
Guide

Managing destinations

A destination is an HTTPS endpoint a trigger delivers matching events to. When an event fires, Maton delivers it to every enabled destination.

You can manage trigger destinations in three ways:

  • Console: Best for getting started and inspecting your trigger destinations.
  • API: Programmatically manage trigger destinations using the Destination API.
  • AI agent: Ask your AI to manage trigger destinations for you with the Maton Skill.

Creating a destination

Open the trigger page you want to modify, then click + on the right end of the Destinations section.

Configure where the trigger should deliver to when it fires, then click Add.

Updating a destination

Open the destination and edit its name, endpoint, and body. You can enable or disable the destination by clicking on the toggle next to its name. You can also rotate the signing secret by clicking Rotate at the bottom of the panel.

Deleting a destination

Click on the vertical dots at the right end of its row and select Delete.

Shaping payload

A destination receives the full event payload by default. The following is what your destination receives for a email.received event in google-mail. For other event examples, see each app's integration page.

{
  "threadId": "19ee22f009a785f5",
  "snippet": "Delivered in as little as 25 minutes.",
  "labelIds": [
    "CATEGORY_PROMOTIONS",
    "UNREAD",
    "INBOX"
  ],
  "payload": {
    "headers": [
      {
        "name": "Delivered-To",
        "value": "recipient@example.com"
      }
    ],
    "mimeType": "text/html"
  },
  "historyId": "14215811",
  "id": "19ee22f009a785f5",
  "sizeEstimate": 131819,
  "internalDate": "1781911191000"
}

To customize the event payload, you can specify a JSON template with {{...}} placeholders that Maton fills in from the event above when it delivers.

PlaceholderResolves to
{{ payload }}The full event payload
{{ payload.x.y.z }}A nested field inside the source payload
{{ trigger_id }}, {{ trigger_name }}Trigger ID and name
{{ event_id }}, {{ source }}, {{ event_type }}Event metadata
{{ received_at }}When the event was received

Verifying deliveries

Each destination has a signing secret Maton uses to sign every delivery so your endpoint can confirm a request came from Maton. The secret is shown in plaintext only when the destination is created or rotated.

Save the signing secret if you plan to use it. You won't be able to see it again.

Next

On this page