Difference between revisions of "Trigger: VPN State"

 
Line 5: Line 5:
 
* '''Enabled''': Trigger when a VPN connection is established
 
* '''Enabled''': Trigger when a VPN connection is established
 
* '''Disabled''': Trigger when a VPN connection is terminated
 
* '''Disabled''': Trigger when a VPN connection is terminated
 
''' Requirements '''
 
 
* Requires Android 5.0 (Lollipop, API 21) or higher
 
  
 
''' Configuration '''
 
''' Configuration '''

Latest revision as of 22:01, 7 January 2026

This trigger will fire when a VPN (Virtual Private Network) is connected or disconnected. It monitors network connectivity changes to detect VPN state transitions.

Options

  • Enabled: Trigger when a VPN connection is established
  • Disabled: Trigger when a VPN connection is terminated

Configuration

Select whether to trigger when a VPN is connected (Enabled) or disconnected (Disabled). The trigger monitors network connectivity changes to detect VPN state.

Examples

Triggers

VPN State (Enabled)
Actions

Notification: VPN Connected
    Your connection is now secure
Set Variable: [vpn_status] = Connected

Notify when VPN connection is established.


Triggers

VPN State (Disabled)
Actions

Notification: VPN Disconnected - Warning!
    Your connection is no longer protected
Speak Text: VPN has disconnected

Alert when VPN disconnects unexpectedly.

Notes

  • The trigger works with any VPN app that uses standard Android VPN APIs.
  • Detection is based on network connectivity changes, so there may be a brief delay between the actual VPN state change and trigger activation.
  • Useful for security-conscious workflows that require awareness of VPN connection status.
  • Consider pairing with a VPN constraint to ensure actions only run when VPN is in the desired state.
  • Works with both system VPN connections and third-party VPN applications.

See Also