Ntfy icon

Ntfy

Send notifications via ntfy.sh

Overview

This node allows sending notifications via the ntfy.sh service, a simple and open-source notification server. It is useful for automating alerting or messaging workflows where you want to push notifications to specific topics that subscribers can listen to.

Typical use cases include:

  • Sending alerts about system events or monitoring results.
  • Broadcasting messages to a group of users subscribed to a topic.
  • Triggering notifications with actionable buttons (e.g., opening URLs or making HTTP requests).
  • Including attachments or setting message priority for better visibility.

For example, you could configure this node to send a notification to a topic named "server-alerts" whenever a server goes down, including a link to the monitoring dashboard.

Properties

Name Meaning
Topic The topic name to which the notification will be sent. Subscribers listening to this topic will receive the notification.
Message The main body text of the notification.
Additional Fields A collection of optional fields to customize the notification:
- Actions One or more action buttons attached to the notification. Each action can be of type View, Broadcast, or HTTP. HTTP actions support specifying method, headers (in JSON), and body. Actions can optionally clear the notification after being tapped.
- Attachment URL URL of an attachment to include in the notification (e.g., image or file).
- Click URL URL to open when the notification itself is clicked.
- Priority Notification priority level, from Min (1) to Max (5), with Default (3) as the normal priority.
- Tags Comma-separated list of tags that may correspond to emojis or other metadata.
- Title Title of the notification message. If not set, defaults to ntfy.sh/<topic>.

Output

The node outputs an array of JSON objects, each representing the response from the ntfy.sh API after publishing a notification. The structure corresponds to the JSON returned by the ntfy.sh service confirming the notification was accepted or detailing any errors.

No binary data output is produced by this node.

Example output JSON snippet:

{
  "message": "Notification published",
  "topic": "your-topic-name",
  "status": "ok"
}

Dependencies

  • Requires access to the ntfy.sh notification service, either the public instance at https://ntfy.sh or a self-hosted ntfy server.
  • Optionally uses an API base URL credential if configured; otherwise defaults to the public ntfy.sh URL.
  • No additional external libraries beyond standard HTTP request helpers provided by n8n.

Troubleshooting

  • Invalid JSON in action headers: When specifying HTTP action headers, ensure the input is valid JSON. Malformed JSON will cause an error. Use a JSON validator to check the headers string.
  • Network or authentication errors: If using a private ntfy server or API key, verify credentials and network connectivity.
  • Empty required fields: The "Topic" and "Message" fields are mandatory. Omitting them will cause the node to fail.
  • Malformed additional fields: Ensure all optional fields like tags and actions are correctly formatted. For example, tags should be comma-separated strings without extra spaces.

If the node is set to continue on failure, errors will be included in the output JSON under an error property instead of stopping execution.

Links and References

Discussion