ComfyUI Node

On Complete Email Me

Get the finished render emailed to you — image attached — without babysitting ComfyUI

By bobddadoo·Created 2 years ago·Updated 3 months ago· 4
On Complete Email Me
  • any
  • images
    sender_email[email protected]
    sender_passwordpassword
    messageAll the generated images are complete. Please review them!

    You've queued a 12-image batch, the overnight job is running, and you'd rather be asleep than parked in front of the progress bar. OnCompleteEmailMe is the node that sends you an email - with the last generated image attached - the moment the workflow reaches it. It's the flagship of the hyunamy/comfy-ui-on-complete-email-me pack, and at zero impressions it's also the one nobody has Googled yet. You're early, which is fine: for the "I need to know it finished, and I'm not at the machine" case, nothing else in the pack does it.

    Despite the name, the email side is dead simple under the hood. The node uses Python's stdlib smtplib over SSL to smtp.gmail.com:465 - no external API, no key, no OAuth dance. It converts the last image of your batch to a JPEG, saves it to a temp path, and attaches it to a MIMEMultipart message. The one meaningful prerequisite is that Gmail requires an App Password, not your account password (you'll need 2FA enabled to create one at Google App Passwords). Put your real password in and SMTP login just fails.

    Four inputs actually matter, and here they are:

    • sender_email - your Gmail address.
    • sender_password - the App Password. The field is marked as a password input, but note it lives in plaintext inside your workflow JSON. Anyone who gets that file gets your app password, so use one you can revoke.
    • recipient_emails - where it goes. The README says one per line, but the code actually splits on commas, so if you want multiple recipients, separate them with commas or they'll be mashed into one address.
    • message - the email body.

    Plus the any wildcard input to force ordering (wire your final image into it so the email goes out after generation), and an optional images input - leave that unwired and you get an email with no attachment, which defeats the point. Wire the batch.

    Install is the same shared story: ComfyUI Manager → Install via Git URL with https://github.com/hyunamy/comfy-ui-on-complete-email-me, or cd ComfyUI/custom_nodes && git clone that URL and restart. Requirements are numpy, pillow, requests, and pygame, all of which ComfyUI already has - nothing to download. The requirements.txt also lists comfy-utils, which isn't a real pip package; ignore it, the code imports everything it needs from local files and ComfyUI's own modules.

    The failure modes are real and specific:

    • 'ascii' codec can't encode character '\xa0' - this is the pack's own documented gotcha: a non-breaking space snuck into the app password when you pasted it. The README's fix is to retype it by hand instead of copy-pasting. It's as annoying as it sounds, and it's the #1 reason emails "don't send."
    • Login rejected - wrong app password, or 2FA not enabled so Google won't issue one.
    • Attachment path quirk - the code hardcodes C:\tmp\last_processed_image.jpg. On Windows that's a normal temp dir; on Linux the code cheerfully creates a folder literally named C:\tmp inside your ComfyUI directory. Ugly, mostly harmless, worth knowing if you spot a weird directory.

    It only speaks Gmail - no Outlook, no generic SMTP. If that's fine, and you've set up an app password once, this is the set-and-forget "email me the result" node. Overnight renders just got a lot more sleep-friendly.

    Categoryutils

    Inputs (6)

    NameTypeDefaultDescription
    any*
    sender_emailSTRING[email protected]
    sender_passwordSTRINGpassword
    recipient_emailsSTRING[email protected] [email protected]
    messageSTRINGAll the generated images are complete. Please review them!
    imagesoptIMAGE

    Outputs (0)

    No outputs