Skip to main content

ntfy Push Notification Helpers

ntfy_send(config) → (success, error)

Send a push notification via ntfy and wait for confirmation (10s timeout).

Config table fields:

  • server (string, optional) - ntfy server URL (default: "https://ntfy.sh")
  • topic (string, required) - Topic name to publish to
  • message (string, required) - Notification message body
  • title (string, optional) - Notification title
  • priority (string, optional) - "max", "urgent", "high", "default", "low", or "min"
  • tags (string or array, optional) - Tags as comma-separated string or array
  • click (string, optional) - URL to open on click
  • attach (string, optional) - Attachment URL
  • actions (string, optional) - Action buttons in ntfy format
  • icon (string, optional) - Custom icon URL
  • email (string, optional) - Email address to forward to

Returns: success (boolean), error (string|nil).

ntfy_send_async(config) → boolean

Fire-and-forget variant (10s timeout in background). Same config as ntfy_send. Returns true if queued, false if validation failed.