Skip to main content

draft-payment-reminder

Draft a payment reminder for overdue invoices with human approval. Creates a Plan file in Plans/ with proposed message for user to approve before sending via WhatsApp.

Jump to install

Source facts

Repository
jawwad-ali/autonomous-email-fte
Last source activity
February 14, 2026 at 14:20
Detected SKILL.md language
English
Stars
5
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
draft-payment-reminder
description
Draft a payment reminder for overdue invoices with human approval. Creates a Plan file in Plans/ with proposed message for user to approve before sending via WhatsApp.
allowed-tools
Read, Write, Bash, Glob, mcp__whatsapp__search_contacts
# Draft Payment Reminder Skill You are drafting a payment reminder message for overdue invoices that requires human approval before sending. ## Input You will receive a JSON string as `$ARGUMENTS`: ```json { "customer": "Customer Name", "partner_id": 9, "phone": "923211234567", "email": "customer@example.com", "invoices": [ { "number": "INV/2026/00002", "amount_due": 46250.00, "currency": "USD", "due_date": "2026-02-13", "days_overdue": 1 } ], "escalation_level": "gentle", "reminder_count": 0 } ``` ## Your Task 1. Parse the JSON input to extract customer info, invoices, and escalation level 2. Resolve WhatsApp contact using the phone number 3. Draft an appropriate payment reminder message 4. Create a Plan file for human approval ## Execution Steps ### Step 1: Parse Input Extract all fields from the JSON. Key fields: - `customer`: Customer display name - `partner_id`: Odoo partner ID (for approval re-check) - `phone`: Normalized phone digits (may be null) - `email`: Customer email (may be null) - `invoices[]`: Array of overdue invoice objects - `escalation_level`: One of `gentle`, `firm`, `final` - `reminder_count`: Previous reminders sent (0, 1, or 2) ### Step 2: Resolve WhatsApp Contact If `phone` is provided: 1. Use `mcp__whatsapp__search_contacts` with the phone number to find a matching WhatsApp contact 2. If found, extract the JID (format: `phonenumber@s.whatsapp.net`) 3. If not found, construct JID as `{phone}@s.whatsapp.net` and note it may not be valid If `phone` is null: - Set channel to `email` if email exists, otherwise `manual` - Set JID to null ### Step 3: Determine Delivery Channel - If WhatsApp JID resolved: channel = `whatsapp` - If no WhatsApp but email exists: channel = `email` - If neither: channel = `manual` ### Step 4: Draft Reminder Message **CRITICAL**: Match the tone to the escalation level. #### Gentle (1st reminder, reminder_count=0) Friendly, professional tone. Assume the customer may have simply overlooked the invoice. Example structure: ``` Hi [Customer], I hope you're doing well. This is a friendly reminder that the following invoice(s) are currently outstanding: [Invoice table] Total outstanding: [Currency] [Amount] Could you kindly arrange payment at your earliest convenience? If you've already processed the payment, please disregard this message. Thank you for your continued business! Best regards, Ali Jawwad Ali's IT Services ``` #### Firm (2nd reminder, reminder_count=1) Professional but more direct. Reference the previous reminder. Example structure: ``` Hi [Customer], I'm following up on my previous reminder regarding the following overdue invoice(s): [Invoice table] Total outstanding: [Currency] [Amount] These invoices are now [X] days past due. I'd appreciate if you could provide an update on the payment status or arrange settlement soon. Please let me know if there are any issues I can help resolve. Best regards, Ali Jawwad Ali's IT Services ``` #### Final (3rd reminder, reminder_count=2) Formal, serious tone. This is the last reminder before escalation. Example structure: ``` Dear [Customer], This is a final reminder regarding the following significantly overdue invoice(s): [Invoice table] Total outstanding: [Currency] [Amount] These invoices are now [X] days past due. Despite previous reminders, payment has not been received. I kindly request immediate attention to this matter. Please arrange payment or contact me to discuss a resolution within the next few days. Regards, Ali Jawwad Ali's IT Services ``` ### Step 5: Create Plan File Create the file at: `Plans/Reminder_[YYYYMMDD_HHMMSS]_[CUSTOMER_SLUG].md` Where `CUSTOMER_SLUG` is the customer name with spaces replaced by underscores and special characters removed. Use this exact structure: ```markdown --- created: [YYYY-MM-DD HH:MM] type: payment-reminder status: pending_approval customer: [CUSTOMER_NAME] partner_id: [PARTNER_ID] jid: [WHATSAPP_JID_OR_NULL] email: [EMAIL_OR_NULL] channel: [whatsapp|email|manual] escalation: [gentle|firm|final] invoices: [COMMA_SEPARATED_INVOICE_NUMBERS] tags: [payment, reminder, hitl, overdue] --- # Payment Reminder: [CUSTOMER_NAME] ## Overdue Invoices | Invoice | Amount Due | Currency | Due Date | Days Overdue | |---------|-----------|----------|----------|--------------| | [INV_NUMBER] | [AMOUNT] | [CURRENCY] | [DATE] | [DAYS] | **Total Outstanding**: [CURRENCY] [TOTAL_AMOUNT] ## Proposed Message [THE DRAFTED REMINDER MESSAGE] ## Delivery Channel **Channel**: [WhatsApp / Email / Manual Follow-up] **Recipient**: [JID or email address or "No contact info"] ## Approval - [ ] **APPROVE** - Send this reminder - [ ] **EDIT** - I'll modify the message below - [ ] **REJECT** - Don't send anything ### Modified Message (if editing) [Leave empty - user fills this if they choose EDIT] --- **Escalation**: [gentle/firm/final] (reminder [N+1] of 3) **JID:** [WHATSAPP_JID] *Generated by Claude - Awaiting human approval* ``` ## Output After creating the plan, output: ``` REMINDER DRAFTED: [filename] CUSTOMER: [customer name] ESCALATION: [gentle/firm/final] (reminder [N+1] of 3) CHANNEL: [whatsapp/email/manual] STATUS: Awaiting approval ACTION: Open Plans/[filename] in Obsidian and check APPROVE to send. ```
View on GitHub