Skip to content

ntfy Notify

This module sends notifications to the ntfy.sh service, a topic-based push notification service. Its capabilities include:

  1. Message with dynamic variables: The title and message support {{variable}} variables that are replaced with flow data.
  2. Flexible authentication: Supports Bearer authentication (tokens tk_*) and Basic. Can use a direct token or stored credentials.
  3. File sending: Supports sending one or multiple files, both local and remote (URLs). Remote files are temporarily downloaded before sending.
  4. File list in message: Optionally appends the list of sent file names to the message.
  5. Advanced notification options: Supports priority (1-5), tags, actions (buttons), click URL, icons, delay, email and call.
  6. Markdown format: Optionally allows Markdown format in the message.

The execution flow is:

  1. Processes dynamic variables in title and message.
  2. Configures authentication (Bearer or Basic).
  3. Sends individual files via PUT to https://ntfy.sh/{topic}.
  4. Sends the main message as JSON via POST to https://ntfy.sh.
ParameterTypeRequiredDescription
credentials_idcredentialsNoAuthentication credentials (username/token).
topictextYesntfy.sh topic to send the notification to.
baseMessagetextNoMessage body. Supports dynamic variables.
titletextNoNotification title. Default: “Notification”.
prioritynumberNoNotification priority (1=min, 3=default, 5=max).
clicktextNoURL that opens when clicking the notification.
tagstextNoTags separated by commas (e.g.: “warning,robot”).
actionstextNoActions/buttons for the notification.
showFileNamesbooleanNoAppend list of sent files to the message. Default: true.
filePathtextNoPath to a local file or remote URL to attach.
filePathstextNoArray of file paths/URLs to attach.
fileUrlstextNoRemote file URLs to attach.

Optional. If provided, the object must contain username or token for authentication with ntfy.sh.

{
"nextModule": "siguiente-nodo",
"data": {
"topic": "mi-topico",
"message": "Proceso completado exitosamente\n\nArchivos enviados:\n- reporte.pdf",
"title": "Alerta de sistema",
"priority": 4
},
"result": {
"messageSent": true,
"sentFiles": ["reporte.pdf"],
"payload": { },
"status": 200
}
}
{
"topic": "mi-canal-alertas",
"title": "Alerta: {{tipo_alerta}}",
"baseMessage": "Se detecto un evento en {{sistema}}",
"priority": "4",
"tags": "warning,alert"
}
  • ntfy.sh API:
    • POST https://ntfy.sh - Send JSON message.
    • PUT https://ntfy.sh/{topic} - Send file attachments.
  • Documentation: https://docs.ntfy.sh/
  • ntfy.sh is a free and open-source push notification service.
  • Remote files (URLs) are temporarily downloaded to the system directory and deleted after sending.
  • File content type is automatically detected using the mime-types library.
  • Tags can be used to display icons in the notification (e.g.: “warning” shows a warning icon).
  • Priority ranges from 1 (minimum) to 5 (urgent). Default is 3.
  • Supports additional options like delay (scheduled sending), email (email forwarding) and call (phone call).
  • sendNotification (Push Notifications via Firebase)
  • sendMail (Send Mail - email notifications)