Notifications

Flux's notification system is designed to be decoupled and reusable. Instead of hardcoding credentials into every single form, you configure your Providers once and link them to as many forms as you need.

Core Concepts

To effectively use Flux, it helps to understand the two main components of the notification pipeline:

1. Providers (The "How")

A Provider represents the credentials and configuration for a specific service.

  • Analogy: It's like saving a contact in your phone.
  • Examples: "Marketing Gmail", "Engineering Slack Bot", "AWS SES".
  • Storage: These sensitive credentials are encrypted at rest.

2. Notifications (The "When")

A Notification is the link between a specific Form and a Provider. It tells Flux: "When Form A is submitted, send data to Provider B."

  • Flexibility: You can attach multiple notifications to a single form (e.g., Send an email to the user AND post a message to Slack).

Supported Methods

Flux currently supports standard email delivery, with more integrations coming soon.

  • SMTP (Email): (Live)
    Sends a beautifully formatted HTML email containing the form submission data. Supports custom subjects and template variables.
  • Slack: (Coming Soon)
    Posts a formatted message to a Slack channel via an Incoming Webhook.
  • Discord: (Coming Soon)
    Posts alerts to a Discord channel.
  • Generic Webhook: (Coming Soon)
    POSTs the raw JSON payload to any URL you define. Perfect for connecting to automation tools like Zapier, Make (Integromat), or n8n.

Configuring Notifications

Notifications are managed directly within the Form Builder in the TUI.

Step 1: Prepare your Provider

Before adding a notification to a form, ensure you have configured the underlying infrastructure (e.g., added your SMTP server credentials).

  • Navigate to: Dashboard -> SMTP (or relevant service).

Step 2: Attach to a Form

  1. SSH into your Flux instance.
  2. Navigate to Forms and select the specific form you wish to edit.
  3. Select Manage Notifications.
  4. Press n to add a new rule.

Step 3: Define the Rule

The TUI will guide you through the configuration:

  1. Method: Select the type (e.g., SMTP).
  2. Provider Config: Select which stored credential to use from the list (e.g., client-a-mail).
  3. Target:
    • For SMTP: Enter the recipient's email address (e.g., [email protected]).
    • Note: You can create multiple notification rules for the same form to send emails to different people using different providers.
  4. Email Subject (SMTP Only): Define the subject line.
    • Template Support: You can inject form values using handlebars syntax, e.g., New Lead from {{Name}}.

Once saved, the rule is active immediately.