Documentation

Automations

Automations are the core of the NaaS Portal. They define when and how your circuit bandwidth should change, with a 3-tier execution model: Trigger → Action → Notifier.

Automation Architecture

Every automation follows a decision tree structure with three tiers:

TIER 1

Trigger

Decision logic

Returns: true/false
TIER 2

Action

Side effects

Routes: success/failure
TIER 3

Notifier

Terminal reporting

End of chain

Execution Flow

1

Trigger executes

Returns true or false based on conditions

2

Action path executes

true onSuccess action branch
false onFailure action branch
3

Action performs bandwidth changes

Or no-op if configured as "No Action"

4

Notifier executes based on result

No exception → onSuccess notifier
Exception thrown → onFailure notifier
5

Execution completes

Notification sent and results logged to Events

Trigger Types

Triggers determine when an automation runs and which path to take. Each trigger type has two states that route to different actions.

Schedule Trigger

Execute based on a recurring schedule with configurable days and times.

Schedule Trigger

Configuration
  • Days: Select one or more days (Sun-Sat)
  • Start Time: When to trigger the "start" state
  • End Time: When to trigger the "end" state
  • Timezone: Your local timezone for scheduling
States
true "Start Time" - Schedule begins
false "End Time" - Schedule ends

Use cases:

  • Business hours bandwidth boost (9am-6pm weekdays)
  • Weekend maintenance windows
  • Peak/off-peak pricing optimization

Monitor Trigger

Execute based on host availability (ping monitoring).

Monitor Trigger

Configuration
  • Host: IP address or hostname to ping
  • Retries: Number of ping attempts (1-10)
  • Timeout: Max wait per ping (1-30 seconds)
  • Interval: Time between checks
States
true "Host Down" - Outage detected
false "Host Up" - Recovery detected

Use cases:

  • Failover bandwidth when primary host goes down
  • Automatic recovery when service comes back online
  • Load balancing based on server availability

Webhook Trigger

Execute when an external HTTP request is received.

Webhook Trigger

Configuration
  • Webhook ID: Auto-generated UUID
  • URL Format: /api/webhooks/{webhookId}/{path}
  • Method: HTTP POST
States
true Path ends with /success
false Path ends with /failure

Use cases:

  • CI/CD pipeline triggers (deployment events)
  • Integration with external monitoring systems
  • Manual triggering via API call
Webhook Security: The webhook URL includes a random UUID that acts as a shared secret. Keep this URL private and regenerate if compromised.

One-Time Trigger

Execute once at a specific date and time.

One-Time Trigger

Configuration
  • Start DateTime: When to trigger "start"
  • End DateTime: When to trigger "end"
  • Timezone: Your local timezone
States
true "Start Time" reached
false "End Time" reached

Use cases:

  • Scheduled maintenance windows
  • One-off events (product launches, streaming events)
  • Temporary bandwidth increases for specific occasions

Action Types

Actions perform the actual bandwidth changes. Each trigger state can have its own action configuration.

Bandwidth Action

The primary action type that modifies circuit bandwidth.

Bandwidth Action

Configuration
  • Circuit Selection: Choose specific circuits or use tags
  • Bandwidth Value: Target bandwidth amount
  • Unit: Kbps, Mbps, or Gbps
Behavior
  • • Respects circuit priority ordering
  • • Skips circuits with manual overrides
  • • Updates circuit state to ALTERED
  • • Logs execution details to Events

No Action

A placeholder action that does nothing. Useful when you only want to notify without making bandwidth changes on one of the trigger paths.

Notifier Types

Notifiers send notifications about automation execution results. Configure your notifier credentials in Account → Notifiers first.

Postmark Email

Send email notifications via Postmark.

Postmark Notifier

Setup (in Account → Notifiers)
  • Server Token: Your Postmark server token
  • Sender Email: Verified sender address
Per-Automation Config
  • Recipients: Email addresses (semicolon-separated)
  • • Uses account email if not specified

Slack

Send notifications to a Slack channel via incoming webhook.

Slack Notifier

Setup (in Account → Notifiers)
  • Webhook URL: Slack incoming webhook URL
  • • Messages use Block Kit formatting with status emoji

Microsoft Teams

Send notifications to a Teams channel via incoming webhook.

Teams Notifier

Setup (in Account → Notifiers)
  • Webhook URL: Teams incoming webhook URL
  • • Messages use Adaptive Card format with theme colors

Managing Automations

Creating an Automation

1

Navigate to Automations from the sidebar

2

Click Create Automation

3

Enter a descriptive name for the automation

4

Configure the trigger type and its settings

5

Configure actions for each trigger state (true/false paths)

6

Optionally configure notifiers for success/failure

7

Click Save

Note: New automations are created in a disabled state. Toggle the power icon to enable them.

Enabling/Disabling

Click the power icon on an automation card to toggle its enabled state. Disabled automations won't execute their triggers.

Manual Triggering

For testing or emergency situations, you can manually trigger an automation:

1

Click the play icon on the automation card

2

Select which state to trigger (true or false)

3

The automation will execute immediately with the selected state

Editing an Automation

1

Click on an automation card or its edit button

2

Modify the desired settings

3

Click Save to apply changes

Deleting an Automation

1

Click the trash icon on the automation card

2

Confirm the deletion in the modal

Automation States

Idle

Waiting for trigger conditions

Scheduled

Trigger time approaching

Active

Currently executing

Best Practices

Automation Best Practices

Naming Conventions
  • • Use descriptive names: "Peak Hours - Production"
  • • Include the trigger type: "Schedule: Business Hours"
  • • Add environment prefix: "[PROD] Failover Monitor"
Testing
  • • Test with manual triggers before enabling
  • • Start with non-production circuits
  • • Review Events log after first execution
  • • Set up notifications during testing phase

Troubleshooting

Automation not triggering
  • Verify the automation is enabled (power icon should be green)
  • Check that trigger conditions are correctly configured
  • For schedules, verify the timezone is correct
  • Review the Events page for any error messages
Action skipped due to priority

This occurs when a higher-priority automation is controlling the circuit:

  • Check the circuit's priority list to see which automation has control
  • Wait for the higher-priority automation to release control
  • Adjust priorities if the current ordering is incorrect
Notifications not sending
  • Verify notifier configuration in Account → Notifiers
  • Check that webhook URLs are valid and accessible
  • For Postmark, verify your server token and sender email
  • Review the Events page for notifier error details
Circuit shows override active

Manual overrides block all automation control:

  • Go to the Circuits page and find the circuit
  • Click the lock icon and choose "Clear Override"
  • Automations will resume control automatically