Skip to content

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

ChannelStatusUsed ByCredential
Gmail (OAuth2)ACTIVEShipment Emailer, CHAROS Email Reportn8n [CREDENTIAL_ID]
Resend APIACTIVEHandyManny (transactional)noreply@handymanny.cloud
TelegramACTIVECrowBot, Auditor alertsBot token in n8n
WhatsApp (Evolution API)DISCONNECTEDCrowBot (planned)Evolution API on srv1139900:8080
Power AutomateACTIVEWSI Outlook → n8nAzure API Hub
SMTP (generic)NOT CONFIGUREDCHAROS 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

WorkflowIDPurpose
Shipment Notice EmailerdH1nNvwPxR3eyGU8Sends arrival notice emails for ONE + MSC shipments
CHAROS Email Reportry7zDIJTBXzV1dezSends 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.ts in HandyManny
  • Used for: Password reset, platform invitations, bulk notifications

Email Types (4 templates in src/lib/email-templates.ts)

TypeTriggerTemplate
Password ResetUser requests resetReset link + 1hr expiry
Platform InvitationAdmin invites customerAccept link + 7d expiry
Tracking UpdateBulk notification wizardShipment status to customer
Contact FormLanding page submissionForwarded to admin

Key Source Files

  • src/lib/email-client.ts — Resend API client
  • src/lib/email-templates.ts — 4 HTML email templates
  • src/lib/whatsapp-client.ts — WhatsApp Business API client
  • src/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

SourceContentFrequency
CrowBot OrchestratorTracking results, project status, general chatOn-demand
Daily Briefing4-category Spanish summary (DEBE HACER HOY, etc.)Daily 7 AM
Security PatrolGREEN/YELLOW/RED security statusDaily 3 AM
Version ManagerDocker/n8n/SSL/npm update reportDaily 2 AM
Auditor AlertScore drop below 70 notificationWhen triggered

n8n Alert Workflow

  • ID: iCi0oHtOg0k43IFI (ACTIVE)
  • Trigger: /charos-audit-report webhook
  • 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-api on root_default Docker 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 identifier
    • WHATSAPP_ACCESS_TOKEN — OAuth bearer token
    • WHATSAPP_VERIFY_TOKEN — Webhook verification
    • WHATSAPP_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/both
    • POST /api/shipments/[id]/notify — Single shipment notification
    • POST /api/webhooks/whatsapp — Inbound message receiver
  • Blocker: Need Meta Business account + approved WhatsApp number + fill env vars

To Activate

  1. Access Evolution API at srv1139900:8080
  2. Scan QR code with business WhatsApp number
  3. Set EVOLUTION_API_KEY in relevant n8n workflows
  4. Test CrowBot WhatsApp response flow
  5. Connect HandyManny bulk notification WhatsApp backend

Power Automate (WSI Outlook → n8n)

Active Flows

FlowTriggerDestinationFrequency
Flagged Email IngestorOutlook "When email is flagged"POST /wsi-tasksOn-demand
Recap JSONTimerPOST /wsi-tasks (action=recap)Every 20 min
SF Data PushTimerPOST /sf-data (action=push)Periodic

Architecture

Outlook → Power Automate → HTTP POST → n8n webhook → AI classify → store

API Keys

WebhookKeyField
/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 to field → 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)

WorkflowIDStatusChannel
Shipment Notice EmailerdH1nNvwPxR3eyGU8ACTIVEGmail
CHAROS Email Reportry7zDIJTBXzV1dezACTIVE (needs SMTP link)Gmail (planned)
Expediente NotificationsuMvWVvFbRcfB2qyVACTIVEWebhook callback
CrowBot OrchestratorcE3MeCxzEq8stEzUACTIVETelegram
CrowBot Daily BriefingDluVLcWCRANrFwp3ACTIVETelegram
CrowBot Security Patrol2OZeifB6TsZXrpzMACTIVETelegram
Auditor AlertiCi0oHtOg0k43IFIACTIVETelegram
Sales Digest GeneratorBssAxFxxEWk2T67TACTIVEIn-app (Sales MC)
WSI Follow-up IngestorbpSRrvueoqy1E32MACTIVEIn-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

HandyManny Documentation System