# ComfyUI DropSend Node Automatically upload your ComfyUI output files to Dropbox with optional encryption. Set it and forget it! > **Prefer Google Drive?** Check out [DriveSend Node](https://github.com/machinepainting/ComfyUI_DriveSendNode) ![DropSend Node Overview](Images/DropSend_Node_Display.jpg) --- ## ๐Ÿ”„ How It Works ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ CLOUD (RunPod, etc.) โ”‚ โ”‚ โ”‚ โ”‚ ComfyUI generates files โ”€โ”€โ†’ DropSend Node โ”€โ”€โ†’ Uploads to Dropbox โ”‚ โ”‚ (png, mp4, etc.) โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ–ผ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Encryption OPTIONAL โ”‚ โ”‚ โ”‚ โ”‚ โ˜ OFF: file.png โ”‚ โ”‚ โ”‚ โ”‚ โ˜‘ ON: file.png.enc โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ–ผ โ˜๏ธ DROPBOX โ”‚ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ YOUR LOCAL MACHINE โ”‚ โ”‚ โ”‚ โ”‚ Dropbox syncs/downloads โ”€โ”€โ†’ If encrypted: Run decrypt script (local) โ”‚ โ”‚ โ”€โ”€โ†’ file.png (viewable!) โ”‚ โ”‚ โ”‚ โ”‚ If not encrypted: Ready to use! โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` **Encryption is completely optional.** Leave `enable_encryption` off and files upload directly as-is. --- ## ๐Ÿ“ค Features ### DropSend AutoUploader Node - Real-time folder monitoring with optional subfolder support - Supports: `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.mp4`, `.avi`, `.mov` - Optional AES-128 encryption before upload - SHA256 checksum verification - Queue system for reliable uploads ### DropSend Setup Node - Generates Dropbox refresh token from App Key/Secret - Outputs credentials for RunPod environment variables - Optional encryption key generation ### Decryption Scripts (Local Use) - Cross-platform scripts for macOS, Windows, and Linux - Decrypt `.enc` files after downloading from Dropbox --- ## ๐Ÿ’พ Installation ```bash cd ComfyUI/custom_nodes/ git clone https://github.com/machinepainting/ComfyUI_DropSendNode.git pip install -r ComfyUI_DropSendNode/requirements.txt ``` Restart ComfyUI after installation. --- ## ๐Ÿ”ง Dropbox App Setup 1. Login to [Dropbox](https://www.dropbox.com/) 2. Go to [Dropbox Developers](https://www.dropbox.com/developers/) โ†’ Click **Create Apps** 3. Select **Scoped Access** โ†’ **App Folder** (recommended) 4. Name your app โ†’ Click **Create app** 5. Go to **Permissions** tab and enable: - `account_info.write`, `account_info.read` - `files.metadata.write`, `files.metadata.read` - `files.content.write`, `files.content.read` 6. Click **Submit** to save permissions 7. Go to **Settings** tab โ†’ Note your **App Key** and **App Secret** > **Note:** If you can't select App Folder, create an `/Apps/` folder in your Dropbox root first. --- ## ๐Ÿƒโ€โ™‚๏ธ DropSend Setup (RunPod & Cloud Users) ### Step 1: Run Setup Node 1. Add **DropSend Setup Node** to your workflow 2. Configure: - `app_key`: Paste your App Key - `app_secret`: Paste your App Secret - `auth_code`: Leave blank (for now) - `dropbox_dest_folder`: `/Apps/ComfyUI_Output_Files` (or your choice) - `storage_method`: **display_only** - `encryption_key_method`: **Display Only** (or off if not using encryption) 3. Run the node โ†’ Two Dropbox popups appear 4. Accept permissions โ†’ Copy the authorization code 5. Paste code into `auth_code` field 6. Run the node again ### Step 2: Copy Credentials from Console The console displays: ``` DROPBOX_APP_KEY: XXXXXXXXXX DROPBOX_APP_SECRET: XXXXXXXXXX DROPBOX_REFRESH_TOKEN: XXXXXXXXXX COMFYUI_ENCRYPTION_KEY=XXXXXXXXXX (if encryption enabled) ``` **Copy only the value after the `:` or `=` sign** (not the variable name). ### Step 3: Create RunPod Secrets 1. Go to [RunPod.io](https://www.runpod.io) โ†’ Click **Secrets** in sidebar 2. Create these secrets: | Secret Name | Secret Value | |-------------|--------------| | `DROPBOX_APP_KEY` | Your app key | | `DROPBOX_APP_SECRET` | Your app secret | | `DROPBOX_REFRESH_TOKEN` | Your refresh token | | `COMFYUI_ENCRYPTION_KEY` | Your encryption key (if using encryption) | ### Step 4: Add Environment Variables to Pod 1. Edit your pod template โ†’ **Environment Variables** dropdown 2. Add each variable: | Key | Value | |-----|-------| | `DROPBOX_APP_KEY` | `{{ RUNPOD_SECRET_DROPBOX_APP_KEY }}` | | `DROPBOX_APP_SECRET` | `{{ RUNPOD_SECRET_DROPBOX_APP_SECRET }}` | | `DROPBOX_REFRESH_TOKEN` | `{{ RUNPOD_SECRET_DROPBOX_REFRESH_TOKEN }}` | | `COMFYUI_ENCRYPTION_KEY` | `{{ RUNPOD_SECRET_COMFYUI_ENCRYPTION_KEY }}` | 3. Click **Set Overrides** โ†’ Deploy ### Step 5: Test Upload 1. Add **DropSend AutoUploader Node** to your workflow 2. Set `run_process` to **True** 3. Run a workflow that generates an image 4. Check your Dropbox folder! --- ## ๐Ÿ’ป DropSend Setup (Local Users) 1. Add **DropSend Setup Node** to your workflow 2. Configure: - `app_key`: Paste your App Key - `app_secret`: Paste your App Secret - `auth_code`: Leave blank (for now) - `dropbox_dest_folder`: `/Apps/ComfyUI_Output_Files` - `storage_method`: **env_file** - `encryption_key_method`: **save to .env** (or off) 3. Run the node โ†’ Accept Dropbox permissions โ†’ Copy auth code 4. Paste code into `auth_code` field โ†’ Run again 5. Restart ComfyUI to load the `.env` file 6. Add **DropSend AutoUploader Node** and run! --- ## ๐Ÿ” Decryption Scripts (Local Use Only) The `/scripts/` folder contains scripts to decrypt `.enc` files on your local machine. > โš ๏ธ **LOCAL USE ONLY** โ€” Run these after downloading encrypted files from Dropbox. ### Prerequisites ```bash pip install cryptography ``` ### Store Your Encryption Key **macOS (Keychain):** 1. Open Keychain Access โ†’ File โ†’ New Password Item 2. Name: `ComfyUI_Encryption_Key`, Account: `ComfyUI`, Password: your key **Windows (Environment Variable):** 1. Win + R โ†’ `sysdm.cpl` โ†’ Advanced โ†’ Environment Variables 2. New User Variable: `COMFYUI_ENCRYPTION_KEY` = your key **Linux (Environment Variable):** ```bash echo 'export COMFYUI_ENCRYPTION_KEY="your_key_here"' >> ~/.bashrc source ~/.bashrc ``` ### Run Decryption ```bash cd ComfyUI/custom_nodes/ComfyUI_DropSendNode/scripts # macOS ./decrypt_folder_mac.sh # Windows python decrypt_folder_win.py # Linux ./decrypt_folder_linux.sh # Cross-platform python decrypt_folder.py ``` --- ## ๐Ÿ› ๏ธ Troubleshooting ### Files Not Uploading - Check console for error messages - Verify `run_process` is **True** - Confirm Dropbox folder starts with `/Apps/` ### Encryption Key Not Found - Verify secret name is exactly `COMFYUI_ENCRYPTION_KEY` - Check environment variable is set in pod template - Restart pod after adding environment variables ### Authorization Failed - Re-run setup with `reconnect` set to **true** - Generate a new auth code --- ## โš ๏ธ Security Best Practices 1. **Never commit your `.env` file** โ€” Add to `.gitignore` 2. **Backup your encryption key** โ€” Without it, encrypted files cannot be recovered 3. **Use secure key storage** โ€” Prefer Keychain/Environment Variables over plain text --- ## ๐Ÿงช Tested On - macOS 13+ (Ventura, Sonoma) - Python 3.10 / 3.11 - ComfyUI (Feb 2026) - RunPod GPU instances --- ## ๐Ÿ“ Repository Structure ``` ComfyUI_DropSendNode/ โ”œโ”€โ”€ __init__.py โ”œโ”€โ”€ dropsend_uploader_node.py โ”œโ”€โ”€ dropsend_setup_node.py โ”œโ”€โ”€ dropbox_upload.py โ”œโ”€โ”€ dropbox_auth_manager.py โ”œโ”€โ”€ encrypt_file.py โ”œโ”€โ”€ monitor_output.py โ”œโ”€โ”€ oauth_handler.py โ”œโ”€โ”€ requirements.txt โ”œโ”€โ”€ README.md โ”œโ”€โ”€ .gitignore โ””โ”€โ”€ scripts/ โ”œโ”€โ”€ decrypt_folder.py โ”œโ”€โ”€ decrypt_folder_mac.sh โ”œโ”€โ”€ encrypt_folder_mac.sh โ”œโ”€โ”€ decrypt_folder_win.py โ”œโ”€โ”€ encrypt_folder_win.py โ”œโ”€โ”€ decrypt_folder_linux.sh โ””โ”€โ”€ encrypt_folder_linux.sh ``` --- ## License MIT --- Shout-out to Adam for his contributions to this node build!