Loading...
Loading...
Send an email via the Recoup API the reliable way — a Node helper that serializes the body correctly and fails loudly instead of sending an empty email. Use whenever a task needs to email a report/summary/notification to the account owner or a recipient. ALWAYS use this script to send email; never hand-build `curl … -d "{…}"` with inline `jq`/shell interpolation (that silently produces empty "Message from Recoup" footer-only emails). Pairs with recoup-platform-api-access (which it sends through).
npx skill4agent add recoupable/skills recoup-platform-email-helpercurl -sS … -d "{… \"html\": $(echo "$HTML" | jq -R -s '.') …}"success:truecat > /tmp/report.html <<'HTML'
<h1>Daily Report</h1>
<p>…your real content…</p>
HTMLnode "$SKILL_DIR/scripts/send-email.mjs" \
--subject "Daily Report — $(date '+%B %d, %Y')" \
--html-file /tmp/report.html \
--to owner@example.com$SKILL_DIR~/.agents/skills/recoup-platform-email-helperscripts/send-email.mjs| Flag | Meaning |
|---|---|
| Subject line (optional — the API derives one from the body if omitted). |
| HTML body. Prefer |
| Plain-text body. |
| Recipient (repeatable). Omit to default to the account's own email ("email me this"). |
| CC (repeatable). |
| Room id for the footer "continue the conversation" link. |
| Serialize + validate and print the payload; do not send. Use to preview. |
--html--textRECOUP_API_KEYRECOUP_ACCESS_TOKENRECOUP_API_BASEnode22python3