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:
- An input source
- An output destination
- A template for formatting messages
- 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:
- Input Reception: An input receives a notification (webhook, email, etc.)
- Connection Selection: Relaye identifies all enabled connections for this input
- Template Processing: For each connection, the template is applied to transform the data
- Delivery: The formatted notification is sent to each connection's output
- 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:
- Go to the Connections section
- Click New Connection
- Select an input from the dropdown
- Select an output from the dropdown
- (Optional) Customize the template
- 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:
- Go to the Connections list
- Find the connection you want to modify
- 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:
- Go to the connection's details page
- Click Edit
- Modify the template
- 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:
- Go to the connection's edit page
- Modify the template
- 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:
- Go to the connection's details page
- Click Delete
- Confirm the deletion
Danger
Deleting a connection permanently removes it. If notifications arrive