Install
openclaw skills install cdp-gmail-deliverySend Gmail messages from an operator-controlled Chrome debug session using Gmail CDP automation. Use when the user asks to send email from the local machine, with or without an attachment. Default assumption: Chrome CDP is already installed and available. If the CDP endpoint is unavailable, ask the human operator to help restart the debug Chrome session, then send, and verify in Sent by unique subject.
openclaw skills install cdp-gmail-deliveryUse this workflow when a user asks to send email by Gmail from the local machine, with or without an attachment.
Current limitation: this skill supports plain-text Gmail body content plus attachments. It does not reliably support sending raw HTML as inline Gmail body content.
scripts/restart_debug_chrome.shhttp://127.0.0.1:9222skills/cdp-gmail-delivery/.runtime/pupp-mail.exe, .dll, .js, .jar, .bat, .cmd, .msi, .iso, and similar blocked extensionshttp://127.0.0.1:9222/json/version)If a requested attachment appears blocked or too large for Gmail, stop and ask the human operator for another delivery path. Do not keep retrying the same blocked upload.
If the user wants an HTML newsletter or raw HTML email body, treat inline HTML body delivery as unsupported for this skill under the current Gmail compose + CDP model. Use plain-text summary/body plus an .html attachment instead, or use a future Gmail API / MIME-based workflow.
For detectable cases, scripts/send_via_cdp.js should fail before opening Gmail and print a limitation result instead of pretending the upload might work.
scripts/restart_debug_chrome.sh from repo/workspace root.scripts/send_via_cdp.js.Before clicking Send, validate all of the following in the live compose draft:
If any check fails, stop and repair draft fields before send.
.ade, .adp, .apk, .appx, .appxbundle, .bat, .cab, .chm, .cmd, .com, .cpl, .diagcab, .diagcfg, .diagpkg, .dll, .dmg, .ex, .ex_, .exe, .hta, .img, .ins, .iso, .isp, .jar, .jnlp, .js, .jse, .lib, .lnk, .mde, .mjs, .msc, .msi, .msix, .msixbundle, .msp, .mst, .nsh, .pif, .ps1, .scr, .sct, .shb, .sys, .vb, .vbe, .vbs, .vhd, .vxd, .wsc, .wsf, .wsh, .xll.zip or .tgzUse these constraints as preflight filters. If the file is likely to be blocked, do not claim it can be mailed successfully.
.html fileFrom the workspace root, run:
bash skills/cdp-gmail-delivery/scripts/install_runtime.sh
What it does:
skills/cdp-gmail-delivery/.runtime/pupp-mailpuppeteer-core@24This keeps the runtime local to the skill instead of using an ad hoc /tmp path.
node skills/cdp-gmail-delivery/scripts/send_via_cdp.js \
--to "recipient@example.com" \
--body "Optional message"
With attachment:
node skills/cdp-gmail-delivery/scripts/send_via_cdp.js \
--to "recipient@example.com" \
--file "/absolute/path/to/file.txt" \
--body "Optional message"
With multiple attachments:
node skills/cdp-gmail-delivery/scripts/send_via_cdp.js \
--to "recipient@example.com" \
--file "/absolute/path/to/file-a.txt" \
--file "/absolute/path/to/file-b.txt" \
--body "Optional message"
The script prints:
EMAIL_SENT_OKSUBJECT=<unique-subject>TO=<recipient>FILE_NAME=<basename-only> for each attached fileReport success only after these outputs and Sent verification succeed. Do not expose absolute local filesystem paths in success messages.
When local preflight detects a Gmail attachment limitation, the script should print:
LIMITATION_GMAIL_ATTACHMENTREASON=<limitation-type>DETAILS=<detected-context> when availableACTION=... telling the human operator this is a limitation of Gmail attachment sending for this skillreferences/troubleshooting.mdreferences/receipts.mdhttps://github.com/joustonhuang/chrome_for_openclawchrome_for_openclaw.sh, scripts/restart_debug_chrome.shscripts/xrdp_chrome_debug_setup.shhttps://github.com/joustonhuang/unifaireferences/receipts.mdreferences/troubleshooting.md