# ComfyUI_UploadToWebHook [![GitHub stars](https://img.shields.io/github/stars/jerrywap/ComfyUI_UploadToWebHookHTTP?style=social)](https://github.com/jerrywap/ComfyUI_UploadToWebhookHTTP/stargazers) ![ComfyUI Node](screenshot.png) A custom node for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that allows you to **send generated image(s) or video clips** directly to an HTTP webhook along with optional metadata such as `prompt_id` and `other_data`. --- ## โœจ Features - ๐Ÿ”— Upload a single image or video (from image sequence) to a webhook URL - ๐Ÿ“ฆ Includes `prompt_id` and additional `other_data` as form data - ๐Ÿง  Accepts image tensor input from ComfyUI image nodes - ๐ŸŽ›๏ธ Optional save toggle to control file persistence (save or temp) - ๐Ÿ“‹ Textarea input for passing additional JSON data --- ## ๐Ÿ”ง Installation 1. Clone or download this repo into your `ComfyUI/custom_nodes` directory: ``` cd /workspace/ComfyUI/custom_nodes git clone https://github.com/yourusername/ComfyUI_UploadToWebHook.git ``` 2. Install dependencies: ``` cd ComfyUI_UploadToWebHook bash install.sh ``` 3. Restart ComfyUI (or use the **Reload Custom Nodes** button if available). --- ## ๐Ÿงฉ How to Use In ComfyUI: 1. Drag your image output (e.g., from `VAE Decode`) to the **Send To Http Webhook** node. 2. Configure: - `webhook_url`: The URL that will receive your image or video. - `frame_rate`: Only used when sending multiple images as a video. - `save_image`: Toggle to control whether to store file permanently. - `prompt_id`: (optional) Identifier of your prompt or run. - `other_data`: (optional) JSON key-value data sent as extra POST fields. --- ## ๐Ÿ–ผ๏ธ UI Example ![ComfyUI Node](screenshot.png) --- ## ๐Ÿงช Webhook Example You can test with a free service like [https://webhook.site](https://webhook.site). - The uploaded image/video appears as `file`. - Additional fields (`prompt_id`, `other_data`) are sent as part of the POST form data. --- ## ๐Ÿ“ค Output Payload Sample multipart form sent to webhook: ``` POST /your/webhook HTTP/1.1 Content-Type: multipart/form-data file: image.png / video.mp4 prompt_id: acde070d-8c4c-4f0d-9d8a-162843 other_data: {"hello": "world"} ``` --- ## ๐Ÿ“ Folder Structure ``` ComfyUI_UploadToWebHook/ โ”œโ”€โ”€ __init__.py โ”œโ”€โ”€ requirements.txt โ””โ”€โ”€ install.sh ``` --- ## ๐Ÿง‘โ€๐Ÿ’ป Contributing Pull requests and feature ideas are welcome! Feel free to fork and create a PR. --- ## ๐Ÿ“„ License This project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.