This Python application sends messages to ntfy.sh in a configurable loop. It's perfect for setting up periodic notifications or alerts.
Just click the Run button and open the webview to access the user-friendly web interface:
This will:
- Load a web application with multiple options for sending notifications
- Provide a form interface for entering notification details
- Allow you to run pre-configured demo scripts
- Display real-time results and notification status
- Interactive Form Mode: Fill out a simple form with title, message, topic, tags, and priority
- Pre-configured Demo: Quickly test notifications with a customizable topic
- Easy Navigation: Simple, responsive design with Bootstrap styling
- Real-time Results: See instant feedback when notifications are sent
Type in the terminal or click the "Run Interactive Script" button in the web interface:
python interactive_ntfy.pyThis will:
- Prompt you for a notification title
- Ask for the message body
- Ask for the topic name (without the ntfy.sh/ prefix)
- Send a single notification after confirmation
Open the Shell and type:
python run_ntfy.pyThis will:
- Send 5 messages to ntfy.sh/my_test (default topic)
- Use a 1-minute interval between messages
- Include a title, tags, and priority level
To customize these default settings, edit the variables in the run_ntfy.py file or use command-line arguments.
- Click on Tools in the sidebar
- Select Workflows
- Click Create workflow
- Name it "Run NTFY Script"
- Add a shell command task with:
python interactive_ntfy.py - Save the workflow
- Now you can run it from the workflows panel or set it as the default run button action
python ntfy_loop.py --message "Your message" --title "Your Title" --interval 30 --iterations 10Or use the interactive mode with custom parameters:
python interactive_ntfy.py --tags "warning,skull" --priority 5- Send messages to any ntfy.sh topic (defaults to
my_test) - User-friendly web interface with form-based notification sending
- Configure message title, tags, priority, and delivery delay
- Control the interval between messages
- Limit the total number of messages sent
- Graceful termination with Ctrl+C
- Detailed logging and statistics
- Python 3.6+
- curl installed on your system
Send a basic message to the default topic (my_test):
python ntfy_loop.py --message "System is running normally"Specify a different topic and add a title:
python ntfy_loop.py --topic "my_alerts" --message "CPU usage high" --title "Server Alert"Add tags and set a high priority:
python ntfy_loop.py --message "Critical error detected" --tags "warning,skull" --priority 5Set a custom interval (60 seconds) and limit the number of messages:
python ntfy_loop.py --message "Hourly check-in" --interval 60 --iterations 24usage: ntfy_loop.py [-h] [--topic TOPIC] --message MESSAGE [--title TITLE] [--tags TAGS]
[--priority {1,2,3,4,5}] [--delay DELAY] [-i INTERVAL] [-n ITERATIONS] [-v]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
Send ntfy.sh messages in a loop with configurable parameters.
options:
-h, --help show this help message and exit
--topic TOPIC The ntfy.sh topic to send to. Default is 'my_test'. (default: my_test)
--message MESSAGE The message content to send. (default: None)
--title TITLE Title of the notification. (default: None)
--tags TAGS Comma-separated list of tags (e.g., 'warning,skull'). (default: None)
--priority {1,2,3,4,5}
Priority level (1-5). (default: None)
--delay DELAY Delivery delay (e.g., '10m', '1h'). (default: None)
-i INTERVAL, --interval INTERVAL
Time to wait between messages in seconds. (default: 300.0)
-n ITERATIONS, --iterations ITERATIONS
Maximum number of messages to send. If not specified, the loop will run indefinitely. (default: None)
-v, --verbose Display detailed output including response body. (default: False)
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Set the logging level. (default: INFO)
python ntfy_loop.py --message "Server temperature critical!" --title "Temperature Alert" --tags "warning,thermometer" --priority 5 --interval 300 --iterations 12python ntfy_loop.py --message "Meeting starts in 30 minutes" --title "Meeting Reminder" --tags "calendar" --delay "30m"python ntfy_loop.py --message "Heartbeat check" --title "System Monitor" --interval 3600 --verboseFor more information about ntfy.sh features and capabilities, visit ntfy.sh documentation.
ntfy.sh-sender © 2025 by efenow is licensed under CC BY-NC-SA 4.0