Overview
This node acts as a trigger that listens to Server-Sent Events (SSE) from an ntfy server. It subscribes to one or more specified topics on the ntfy server and triggers the workflow whenever new messages are published to those topics. This is useful for real-time event-driven automation where external systems send notifications or updates via ntfy topics.
Common scenarios:
- Automating workflows based on alerts or notifications sent through ntfy topics.
- Integrating real-time messaging from ntfy into n8n workflows.
- Reacting instantly to events such as system status changes, user actions, or sensor data pushed to ntfy.
Example:
You configure the node to listen to topics like "server-alerts" and "user-signups". When a message is published to either topic on your ntfy server, the workflow triggers and processes the incoming JSON payload accordingly.
Properties
| Name | Meaning |
|---|---|
| Topic(s) | List of ntfy topics to listen to. You can add multiple topics by specifying their names. |
Output
The node outputs an array of JSON objects under the json field. Each object corresponds to a message received from the ntfy SSE stream and contains the parsed JSON data sent in the event.
- The output JSON structure directly reflects the content of the ntfy message payload.
- If the incoming message data is not valid JSON, it logs an error and does not emit that event.
- No binary data output is produced by this node.
Dependencies
- Requires an active connection to an ntfy server supporting Server-Sent Events.
- Needs an API key or token credential for authentication with the ntfy server.
- Uses the EventSource interface (via the
eventsourcenpm package) to subscribe to SSE streams. - Requires proper configuration of credentials in n8n to provide the ntfy server host URL and authentication token.
Troubleshooting
- Invalid JSON for event data: If the incoming event data is not valid JSON, the node logs an error and skips emitting that event. Ensure that the ntfy messages are properly formatted JSON strings.
- EventSource errors: Network issues, incorrect topic names, or invalid authentication tokens may cause SSE connection errors. Check the logs for messages like
EventSource error on topic "<topic>"and verify connectivity and credentials. - No events triggering: Confirm that the topics exist on the ntfy server and that messages are being published to them. Also, ensure the authentication token is valid and has access rights.
- Credential issues: Make sure the API key/token and host URL are correctly set in the node’s credentials configuration.