Skip to content

Connections Overview

Connections (also called Routes in the system) are at the heart of Relaye's functionality. They link inputs to outputs, defining how notifications flow through the system and how they're formatted.

graph TD
    subgraph "Connections Dashboard"
        C1["Server Alerts → Telegram"]:::enabled
        C2["Payment Events → Slack"]:::enabled
        C3["GitHub Webhooks → Email"]:::disabled
        C4["Error Logs → Discord"]:::enabled
    end

What Are Connections?

In Relaye, a connection is a configured link between an input (source of notifications) and an output (destination for notifications). Each connection includes:

  1. An input source
  2. An output destination
  3. A template for formatting messages
  4. An enabled/disabled state

When a notification arrives at an input, Relaye identifies all enabled connections linked to that input and processes the notification through each one, applying the appropriate template and delivering to the configured output.

How Connections Work

The connection process follows these steps:

  1. Input Reception: An input receives a notification (webhook, email, etc.)
  2. Connection Selection: Relaye identifies all enabled connections for this input
  3. Template Processing: For each connection, the template is applied to transform the data
  4. Delivery: The formatted notification is sent to each connection's output
  5. Logging: Success or failure is logged for each delivery

This flow allows you to route a single notification to multiple destinations and format each one appropriately for its destination.

flowchart LR
    I[Input Receives\nNotification] --> S[Select Enabled\nConnections]
    S --> P[Process Template\nfor Each Connection]
    P --> D[Deliver to\nOutput Destinations]
    D --> L[Log Results]

Creating a Connection

To create a new connection:

  1. Go to the Connections section
  2. Click New Connection
  3. Select an input from the dropdown
  4. Select an output from the dropdown
  5. (Optional) Customize the template
  6. Save your connection

Connection Templates

Templates define how notifications are formatted before being sent to outputs. Each connection has its own template, allowing you to customize notifications for different destinations.

By default, new connections use the input type's default template, but you can customize this to:

  • Extract specific information from complex payloads
  • Format notifications appropriately for each output type
  • Add context or branding to notifications
  • Filter out unnecessary details

For detailed information on templates, see the Templating Guide.

Managing Connections

Viewing Connection Details

Click on a connection to view its details, including:

  • Input and output information
  • Template configuration
  • Recent notification history
  • Connection status

Enabling/Disabling Connections

Each connection can be independently enabled or disabled:

  • Enabled: Notifications will be processed and delivered
  • Disabled: Notifications will be ignored

To toggle a connection's state:

  1. Go to the Connections list
  2. Find the connection you want to modify
  3. Click the toggle switch

This allows you to temporarily disable notification routes without deleting them.

Editing Connections

You can edit a connection's template at any time:

  1. Go to the connection's details page
  2. Click Edit
  3. Modify the template
  4. Save your changes

Note

You cannot change a connection's input or output after creation. If you need to change these, create a new connection and delete the old one.

Testing Templates

Relaye provides a template preview feature that shows how your notifications will look:

  1. Go to the connection's edit page
  2. Modify the template
  3. The preview updates in real-time to show the formatted output

This allows you to fine-tune your templates without sending test notifications.

Deleting Connections

To delete a connection:

  1. Go to the connection's details page
  2. Click Delete
  3. Confirm the deletion

Danger

Deleting a connection permanently removes it. If notifications arrive