Security Notice
This document has been auto-published from the internal knowledge base. All passwords, API keys, tokens, and IP addresses have been redacted for security.
Notifications & Communications Specialist
Channel Inventory
| Channel | Status | Used By | Credential |
|---|---|---|---|
| Gmail (OAuth2) | ACTIVE | Shipment Emailer, CHAROS Email Report | n8n [CREDENTIAL_ID] |
| Resend API | ACTIVE | HandyManny (transactional) | noreply@handymanny.cloud |
| Telegram | ACTIVE | CrowBot, Auditor alerts | Bot token in n8n |
| WhatsApp (Evolution API) | DISCONNECTED | CrowBot (planned) | Evolution API on srv1139900:8080 |
| Power Automate | ACTIVE | WSI Outlook → n8n | Azure API Hub |
| SMTP (generic) | NOT CONFIGURED | CHAROS Email Report (blocked) | — |
Gmail (n8n OAuth2)
Credential
- n8n ID:
[CREDENTIAL_ID] - Type: Gmail OAuth2
- Used by: Shipment Notice Emailer, CHAROS Email Report (planned)
Workflows Using Gmail
| Workflow | ID | Purpose |
|---|---|---|
| Shipment Notice Emailer | dH1nNvwPxR3eyGU8 | Sends arrival notice emails for ONE + MSC shipments |
| CHAROS Email Report | ry7zDIJTBXzV1dez | Sends branded truck tracking reports (NEEDS linking) |
Shipment Notice Emailer
- Webhook:
POST /shipment-notice - Input: Carrier tracking data (from Ocean Tracker)
- Output: Formatted email with shipment details
- Fix (2026-02-22): Added Merge node for MSC mixed-carrier bug
Resend API (HandyManny)
Config
- From:
noreply@handymanny.cloud - File:
src/lib/email-client.tsin HandyManny - Used for: Password reset, platform invitations, bulk notifications
Email Types (4 templates in src/lib/email-templates.ts)
| Type | Trigger | Template |
|---|---|---|
| Password Reset | User requests reset | Reset link + 1hr expiry |
| Platform Invitation | Admin invites customer | Accept link + 7d expiry |
| Tracking Update | Bulk notification wizard | Shipment status to customer |
| Contact Form | Landing page submission | Forwarded to admin |
Key Source Files
src/lib/email-client.ts— Resend API clientsrc/lib/email-templates.ts— 4 HTML email templatessrc/lib/whatsapp-client.ts— WhatsApp Business API clientsrc/app/api/notifications/bulk/route.ts— Bulk send endpoint
Bulk Notification System (HandyManny)
- 5-step wizard: Select recipients → Choose channel (email/whatsapp/both) → Compose → Preview → Send
- Model:
NotificationLog(recipientEmail, recipientName, channel, status, sentAt) - WhatsApp option exists in UI but requires WhatsApp Business API setup (not done yet)
Telegram
CrowBot
- Bot: Python service on srv1379713 (
/opt/telegram-bot/) - Owner Chat ID:
5523342814 - n8n Credential:
crowbot-telegram-01(telegramApi) - Service:
telegram-bot.service(systemd)
Telegram Messages Sent By
| Source | Content | Frequency |
|---|---|---|
| CrowBot Orchestrator | Tracking results, project status, general chat | On-demand |
| Daily Briefing | 4-category Spanish summary (DEBE HACER HOY, etc.) | Daily 7 AM |
| Security Patrol | GREEN/YELLOW/RED security status | Daily 3 AM |
| Version Manager | Docker/n8n/SSL/npm update report | Daily 2 AM |
| Auditor Alert | Score drop below 70 notification | When triggered |
n8n Alert Workflow
- ID:
iCi0oHtOg0k43IFI(ACTIVE) - Trigger:
/charos-audit-reportwebhook - Action: If score <70, sends Telegram to
5523342814
WhatsApp (Evolution API)
Evolution API (CrowBot)
- Status: DISCONNECTED — QR code needs re-scanning
- Service: Evolution API v2.3.7 on srv1139900:8080
- Container:
evolution-apionroot_defaultDocker network - PostgreSQL:
evolution-postgres(dedicated) - CrowBot Orchestrator has WhatsApp Reply node (uses
$env.EVOLUTION_API_KEY)
HandyManny WhatsApp Client (Meta Business API)
- File:
src/lib/whatsapp-client.ts - API: Facebook Graph API v21.0
- Env vars (all currently EMPTY):
WHATSAPP_PHONE_ID— Business phone identifierWHATSAPP_ACCESS_TOKEN— OAuth bearer tokenWHATSAPP_VERIFY_TOKEN— Webhook verificationWHATSAPP_APP_SECRET— Webhook signature validation
- Functions:
sendWhatsAppTemplate(to, name, components)(Spanish templates, lang: "es") +sendWhatsAppText(to, body) - Endpoints:
POST /api/notifications/bulk— Bulk send via email/whatsapp/bothPOST /api/shipments/[id]/notify— Single shipment notificationPOST /api/webhooks/whatsapp— Inbound message receiver
- Blocker: Need Meta Business account + approved WhatsApp number + fill env vars
To Activate
- Access Evolution API at srv1139900:8080
- Scan QR code with business WhatsApp number
- Set
EVOLUTION_API_KEYin relevant n8n workflows - Test CrowBot WhatsApp response flow
- Connect HandyManny bulk notification WhatsApp backend
Power Automate (WSI Outlook → n8n)
Active Flows
| Flow | Trigger | Destination | Frequency |
|---|---|---|---|
| Flagged Email Ingestor | Outlook "When email is flagged" | POST /wsi-tasks | On-demand |
| Recap JSON | Timer | POST /wsi-tasks (action=recap) | Every 20 min |
| SF Data Push | Timer | POST /sf-data (action=push) | Periodic |
Architecture
Outlook → Power Automate → HTTP POST → n8n webhook → AI classify → storeAPI Keys
| Webhook | Key | Field |
|---|---|---|
/wsi-tasks | [API_KEY] | body api_key |
/sf-data | [API_KEY] | body api_key |
WSI Email Recap
- Power Automate fetches unread/important/flagged emails every 20 min
- POSTs to n8n with
action: recap - Claude Haiku generates Spanish briefing
- Stored in
staticData.lastRecap - Displayed in MC section 5 + WSI MC section 7 (polls every 2 min)
Email Templates (HTML)
CHAROS Email Report Template
- Generated by: n8n workflow
ry7zDIJTBXzV1dez - Brand: Red accent (#D42A1C), dark header (#3D3D3D)
- Sections: 4 KPI boxes → quick status table → detail cards per truck unit
- Container chips: Color-coded by status (green=on_time, yellow=delayed, red=stopped)
- Preview mode: Send empty
tofield → returns HTML without sending
Shipment Notice Email
- Generated by: n8n workflow
dH1nNvwPxR3eyGU8 - Content: Carrier tracking data formatted for business recipients
- Carriers: ONE + MSC (more to be added as trackers verified)
HandyManny Transactional (Resend)
- Password reset emails
- Platform invitation emails
- Bulk notification emails (custom message)
Notification n8n Workflows (All)
| Workflow | ID | Status | Channel |
|---|---|---|---|
| Shipment Notice Emailer | dH1nNvwPxR3eyGU8 | ACTIVE | Gmail |
| CHAROS Email Report | ry7zDIJTBXzV1dez | ACTIVE (needs SMTP link) | Gmail (planned) |
| Expediente Notifications | uMvWVvFbRcfB2qyV | ACTIVE | Webhook callback |
| CrowBot Orchestrator | cE3MeCxzEq8stEzU | ACTIVE | Telegram |
| CrowBot Daily Briefing | DluVLcWCRANrFwp3 | ACTIVE | Telegram |
| CrowBot Security Patrol | 2OZeifB6TsZXrpzM | ACTIVE | Telegram |
| Auditor Alert | iCi0oHtOg0k43IFI | ACTIVE | Telegram |
| Sales Digest Generator | BssAxFxxEWk2T67T | ACTIVE | In-app (Sales MC) |
| WSI Follow-up Ingestor | bpSRrvueoqy1E32M | ACTIVE | In-app (WSI MC) |
Notification Preferences (HandyManny Prisma Model)
- Per company: channel (email/whatsapp/both), frequency (daily/weekly/immediate)
- Quiet hours: quietHoursStart, quietHoursEnd (HH:MM)
- WhatsApp group: optional whatsappGroupId for group broadcasts
- NotificationLog: tracks recipient, channel, template, status (sent/failed), timestamps
TODO
- [ ] Link Gmail OAuth credential to CHAROS Email Report workflow
- [ ] Set up WhatsApp Business API (Meta Business account + approved number)
- [ ] Fill HandyManny env vars: WHATSAPP_PHONE_ID, WHATSAPP_ACCESS_TOKEN, WHATSAPP_VERIFY_TOKEN
- [ ] Re-scan Evolution API QR code on srv1139900
- [ ] Add more carriers to Shipment Notice Emailer (Maersk, CMA-CGM, etc.)
- [ ] Consider notification rate limiting (max 100/day per customer)
- [ ] Add Resend delivery webhooks for open/delivery tracking