17 Commits
Author SHA1 Message Date
Brambo b139f05110 Fix update from manager
Fix 1 to check if custom node manager is working.
Update readme with changelog and mentioning other node.
Workflow action changed (part of update fix)
2025-05-31 11:32:29 +02:00
Brambo 6bfc8f1fe2 Update pyproject.toml
added icon for registry
2025-05-11 17:30:35 +02:00
Brambo 4b44de4815 Create icon.png
node icon registry
2025-05-11 17:28:46 +02:00
Brambo 7e4d023983 Update pyproject.toml 2025-05-11 17:09:53 +02:00
Brambo 25b6a30685 Update .gitignore 2025-05-11 16:59:56 +02:00
Brambo f7a9d0e2b0 pyproject update 2025-05-11 16:50:46 +02:00
Brambo 3e7225e5da Update publish.yml 2025-05-11 16:47:28 +02:00
Brambo 2e5cc1e4a9 Create publish.yml 2025-05-11 16:42:26 +02:00
Brambo 799d08ee36 Merge branch 'main' of https://github.com/MijnSpam/ComfyUI_UploadToWebhookPushOver 2025-05-10 16:23:01 +02:00
Brambo 596ae76917 Update README.md 2025-05-10 16:22:56 +02:00
Brambo 7a2c1f2d09 Update update.md
typo
2025-05-10 16:21:20 +02:00
Brambo 8862e38cee Update pyproject.toml 2025-05-10 16:11:14 +02:00
Brambo e9e339f43e update info
added an update info file
2025-05-10 16:08:15 +02:00
Brambo a7e7dfe0d2 Update README.md 2025-05-10 15:51:26 +02:00
Brambo c6e96f8b60 Update README.md
image fix
2025-05-10 15:50:29 +02:00
Brambo 4021002596 add new features to main
.env credential store now possible.
connect_anything to allow node to be used anywhere in your workflow.
2025-05-10 15:46:34 +02:00
Brambo 4bbf341bea Connect and credential store
Code update to allow connect anything to get notifications anywhere in your flows.
And allow stored credentials
2025-05-10 15:43:37 +02:00
16 changed files with 134 additions and 32 deletions
+26
View File
@@ -0,0 +1,26 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- "pyproject.toml"
permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'MijnSpam' }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.COMFY }}
+1
View File
@@ -1 +1,2 @@
.env
.github/
+21 -6
View File
@@ -4,7 +4,7 @@ Thanks to Jerryswap UploadToWebhook customnode which I could use as base code fo
![ComfyUI Node](node1.png)
![ComfyUI Node](images/image-connect.png)
A custom node for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that allows you to _send generated image(s)_ directly to Pushover, you can also choose only to get a notifycation. Videos aren't supported.
@@ -17,7 +17,7 @@ A custom node for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that allo
---
## 🔧 Installation
## 🔧 Installation (for updating from v1.0.x to v1.2.x read the update.md file.)
1. Clone or download this repo into your `ComfyUI/custom_nodes` directory:
@@ -48,17 +48,23 @@ In User field, enter specific device key **or** add group key.
In ComfyUI:
1. Drag your image output (e.g., from `VAE Decode`) to the **Send To Http Webhook** node.
![ComfyUI Node](node2.png)
1. Drag any output (e.g., from `VAE Decode`) to the **Send To Pushover** node >> connect_anything
![ComfyUI Node](images/image-connect.png)
2. Configure:
- `connect_anything` : connect any output (mandatory to work)
- `webhook_url`: default is correct.
- `token`: the pushover app token
- `token`: the pushover app token (or use stored credentials option, see step 3)
- `user`: Your user OR group key.
- `image`: if you want an image in your pushover, connect this node and switch on attach_image
3. Optional (since version 1.2)
create an .env in the same folder as this custom-node, see example folder but rename to '.env'
in the node select, 'use stored credentials', any credentials in the node fields will be ignored **even when you enter them!**
---
## 🖼️ UI Example
![ComfyUI Node](node1.png)
![ComfyUI Node](images/image-connect.png)
![Video Node](images/videonode.png)
---
@@ -69,6 +75,8 @@ ComfyUI_UploadToWebHookPushOver/
├── __init__.py
├── requirements.txt
└── install.sh
└── pyproject.toml
└── .env (optional file see how to use step 3)
```
---
@@ -84,3 +92,10 @@ Feel free to fork and create a PR.
This project is licensed under the MIT License.
See [LICENSE](./LICENSE) for details.
## Other custom nodes (search for "KB comfy" in manager)
- Swap and Scale
## Changelog
1.2.2 Trying to fix custom-node update issue.
+55 -18
View File
@@ -6,45 +6,70 @@ import base64
from PIL import Image
import folder_paths
# wildcard trick is taken from pythongossss's
class AnyType(str):
def __ne__(self, __value: object) -> bool:
return False
any_typ = AnyType("*")
def load_env_variable(file_path, variable_name):
# Read the .env file
try:
with open(file_path, 'r') as env_file:
for line in env_file:
key_value = line.strip().split('=')
if len(key_value) == 2 and key_value[0] == variable_name:
return key_value[1].strip()
except FileNotFoundError:
print(f"Error: The file {file_path} was not found.")
except Exception as e:
print(f"An error occurred while reading the .env file: {e}")
# Return None if the variable is not found
return None
class UploadToPushOver:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"images": ("IMAGE",),
"connect_anything": (any_typ,),
"webhook_url": ("STRING", {"default": "https://api.pushover.net/1/messages.json"}),
"token": ("STRING", {"default": "enter your application key"}),
"user": ("STRING", {"default": "enter user or group key"}),
"title": ("STRING", {"default": ""}),
"title": ("STRING", {"default": "Comfy push title"}),
"priority": ("INT", {"default": 0, "lowest": -2, "max": 2}),
"sound":(["pushover", "bike", "bugle", "cashregister", "classical", "cosmic", "falling", "gamelan", "incoming", "intermission", "magic", "mechanical", "pianobar", "siren", "spacealarm", "tugboat", "alien", "climb", "persistent", "echo", "updown", "vibrate", "none"],),
"attachment_type":("STRING", {"default": "image/png"}),
"attach_image": ("BOOLEAN", {"default": True}),
"prompt_id": ("STRING", {"default": "Will be your pushover message, when empty: Workflow ready", "multiline": True})
},
"optional": {
"images": ("IMAGE",),
"token": ("STRING", {"default": "enter your application key"}),
"user": ("STRING", {"default": "enter user or group key"}),
"use_stored_credentials": ("BOOLEAN", {"default": False}),
}
}
RETURN_TYPES = ("STRING",)
RETURN_TYPES = (any_typ,)
OUTPUT_NODE = True
CATEGORY = "Notification"
FUNCTION = "generate_and_upload_image"
def generate_and_upload_image(
self,
images,
connect_anything,
webhook_url: str,
use_stored_credentials:False,
token: str,
title: str,
user: str,
priority: int,
sound: str,
attachment_type: str,
attach_image: True,
save_image=True,
attach_image:True,
prompt_id: str = "",
images: str = "",
):
output_dir = folder_paths.get_output_directory() if save_image else folder_paths.get_temp_directory()
output_dir = folder_paths.get_temp_directory()
#output_dir = folder_paths.get_output_directory() if save_image else folder_paths.get_temp_directory()
# above is old line from original webhook creator
(
full_output_folder,
filename,
@@ -59,8 +84,17 @@ class UploadToPushOver:
parsed_data["message"] = prompt_id
else:
parsed_data["message"] = "Workflow ready" # message can't be empty, pushover wont accept it.
parsed_data["token"] = token
parsed_data["user"] = user
## if stored credentials are used load from file else use input fields.
if use_stored_credentials:
current_dir = os.path.dirname(os.path.abspath(__file__))
env_file_path = os.path.join(current_dir, '.env')
apptoken = load_env_variable(env_file_path, 'apptoken')
usertoken = load_env_variable(env_file_path, 'usertoken')
parsed_data["token"] = apptoken
parsed_data["user"] = usertoken
else:
parsed_data["token"] = token
parsed_data["user"] = user
parsed_data["title"] = title
parsed_data["priority"] = priority
parsed_data["sound"] = sound
@@ -71,7 +105,6 @@ class UploadToPushOver:
single_image = 255.0 * images[0].cpu().numpy()
single_image_pil = Image.fromarray(single_image.astype(np.uint8))
single_image_pil.save(single_file_path)
with open(single_file_path, "rb") as file:
encoded_image = base64.b64encode(file.read()).decode("utf-8")
if attach_image:
@@ -80,10 +113,14 @@ class UploadToPushOver:
webhook_url,
data=parsed_data
)
else:
response = requests.post(
webhook_url,
data=parsed_data
)
# Response output
if response.status_code == 200 or response.status_code == 201 or response.status_code == 204:
print("✅ Successfully uploaded to Webhook.")
print("✅ Successfully uploaded to Pushover.")
print(f"Response Code: {response.status_code}")
print(f"Response Text: {response.text}")
else:
+8
View File
@@ -0,0 +1,8 @@
**Version 1.2.0**
-- support for stored credentials.
-- accept anything input
>> this make you able to connect any output node to start send the notification
>>> If you want to include image in the notification then just connect an image output line to the images input.
**Version 1.0.1**
Initial release
+3
View File
@@ -0,0 +1,3 @@
# specify app key and user/group key if you don't want to set it up in the comfyUI node everytime
apptoken=your-app-token-here
usertoken=your-user-or-group-token-here
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

+8 -8
View File
@@ -1,15 +1,15 @@
[project]
name = "UploadToWebhookPushOver"
description = "Send generated image to PushOver API webhook choose for only notification or add the image result as well."
version = "1.0.1"
license = {file = "LICENSE"}
name = "UploadToPushOver"
description = "Send generated image to PushOver API webhook choose for only notification or add the image result as well. It can connect to anything if you just want a notification somewhere in your workflow"
version = "1.2.2"
license = { file = "LICENSE"}
dependencies = ["numpy", "requests", "Pillow"]
[project.urls]
Repository = "https://github.com/MijnSpam/ComfyUI_UploadToWebhookPushOver"
Repository = "https://github.com/MijnSpam/UploadToPushOver"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "MijnSpam"
DisplayName = "ComfyUI_UploadToPushOver"
PublisherId = "kbrambo"
DisplayName = "Upload to PushOver"
Icon = "https://github.com/MijnSpam/UploadToPushOver/blob/main/images/icon.png?raw=true"
+12
View File
@@ -0,0 +1,12 @@
## 🔧 Update v1.0.x to v1.2.0
1. In the custom nodes manager
find your installed ComfyUI_UploadToPushOver node.
Hit try update:
![Update1](images/update1.png)
2. It can happen that your Manager doesn't report to restart, if so hit the restart button from the manager menu.
![Update2](images/update2.png)
__It could also be that a restart is already happening in the backgroud__.
3. Refresh your browser.
4. Due redesign of the node it's best to re-add it into your workflow as connect_anything is now mandatory and the images input isn't.