{
  "name": "Invoice Follow-up Sequence — Purrly",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": 1,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 0, "y": 0 },
        "restore": { "parameters": { "hook": { "label": "Invoice Overdue Webhook" } } },
        "parameters": [
          { "name": "hook", "type": "hook:gateway:CustomWebHook", "label": "Webhook" },
          { "name": "maxResults", "type": "number", "label": "Maximum number of results" }
        ]
      }
    },
    {
      "id": 2,
      "module": "email:ActionSendEmail",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": "[YOUR_EMAIL]",
        "subject": "Invoice {{1.invoice_number}} is now overdue — follow-up sequence started",
        "content": "<p>Hi,</p><p>This is an automated notification. Invoice <strong>{{1.invoice_number}}</strong> sent to <strong>{{1.client_name}}</strong> is now overdue.</p><p><strong>Amount outstanding:</strong> {{1.amount}}<br><strong>Original due date:</strong> {{1.due_date}}<br><strong>Invoice link:</strong> <a href=\"{{1.invoice_url}}\">{{1.invoice_url}}</a></p><p>The automated follow-up sequence has started. Reminder emails will be sent to the client automatically on the following schedule:</p><ul><li><strong>Day 3:</strong> Polite reminder — warm tone, assumes oversight</li><li><strong>Day 7:</strong> Firm follow-up — professional, direct, clear payment instructions</li><li><strong>Day 14:</strong> Final notice — urgent, outlines next steps if still unpaid</li></ul><p>The sequence will halt automatically as soon as a payment is recorded for this invoice.</p><p>No action is required on your part unless you wish to pause or cancel the sequence in Make.</p>",
        "contentType": "html"
      },
      "metadata": {
        "designer": { "x": 300, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    },
    {
      "id": 3,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 259200
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 600, "y": 0 },
        "label": "Wait 3 days",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 4,
      "module": "email:ActionSendEmail",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": "{{1.client_email}}",
        "subject": "Quick reminder — Invoice {{1.invoice_number}} for {{1.amount}}",
        "content": "<p>Hi {{1.client_name}},</p><p>Just a friendly nudge — Invoice {{1.invoice_number}} for {{1.amount}}, which was due on {{1.due_date}}, is still showing as unpaid on our end.</p><p>It may simply have slipped through the cracks, so I wanted to flag it before it becomes an issue.</p><p>You can view and pay the invoice here:<br><a href=\"{{1.invoice_url}}\">→ View Invoice {{1.invoice_number}}</a></p><p>If you've already sent payment, please disregard this message — and do let me know so I can update our records.</p><p>If you have any questions or need a different payment method, just reply to this email and I'll sort it out straight away.</p><p>Thanks so much,<br>[Your Name]<br>[Business Name]</p>",
        "contentType": "html"
      },
      "metadata": {
        "designer": { "x": 900, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    },
    {
      "id": 5,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 345600
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 1200, "y": 0 },
        "label": "Wait 4 days",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 6,
      "module": "email:ActionSendEmail",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": "{{1.client_email}}",
        "subject": "Invoice {{1.invoice_number}} — one week overdue",
        "content": "<p>Hi {{1.client_name}},</p><p>I'm following up on Invoice {{1.invoice_number}} for {{1.amount}}, which was due on {{1.due_date}} — it is now one week overdue.</p><p>I'd appreciate it if you could arrange payment at your earliest convenience. You can pay directly using the link below:</p><p><a href=\"{{1.invoice_url}}\">→ Pay Invoice {{1.invoice_number}} ({{1.amount}})</a></p><p>If there is a dispute, a question about the work, or a payment arrangement you'd like to discuss, please reply to this email immediately. I'm happy to work something out — but I do need to hear from you.</p><p>If payment has already been sent, please reply with confirmation so I can update our records and stop further reminders.</p><p>Thank you,<br>[Your Name]<br>[Business Name]</p>",
        "contentType": "html"
      },
      "metadata": {
        "designer": { "x": 1500, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    },
    {
      "id": 7,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {
        "delay": 604800
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 1800, "y": 0 },
        "label": "Wait 7 days",
        "parameters": [{ "name": "delay", "type": "number", "label": "Delay (seconds)" }]
      }
    },
    {
      "id": 8,
      "module": "email:ActionSendEmail",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": "{{1.client_email}}",
        "subject": "Final notice — Invoice {{1.invoice_number}} ({{1.amount}} overdue)",
        "content": "<!-- PAYMENT DETECTION BRANCH: In Make, add a Router module before each email module (id 4, 6, and this module). One route checks your invoicing tool or spreadsheet for payment status on invoice {{1.invoice_number}}. If the invoice is marked paid, route to a Stop module to cancel all remaining steps. If still unpaid, route to the email module. This prevents sending reminders after payment is received. --><p>Hi {{1.client_name}},</p><p>This is a final notice regarding Invoice {{1.invoice_number}} for <strong>{{1.amount}}</strong>, which is now <strong>14 days overdue</strong> (original due date: {{1.due_date}}).</p><p>Despite two previous reminders, we have not received payment or a response. We need to resolve this immediately.</p><p><strong>Please pay now using the link below:</strong><br><a href=\"{{1.invoice_url}}\">→ Pay Invoice {{1.invoice_number}} ({{1.amount}})</a></p><p>If payment is not received within the next 7 days, we will have no choice but to pursue the following next steps:</p><ul><li>Apply a late payment fee as permitted under our terms</li><li>Refer the outstanding balance to a collections agency</li><li>Suspend any ongoing work or services pending resolution</li></ul><p>If you have already paid, please disregard this message — and reply so we can update our records and confirm the sequence has been stopped.</p><p>If you are experiencing genuine difficulty and have not been in contact, please reply now. We would rather reach a workable arrangement than escalate this further.</p><p>[Your Name]<br>[Business Name]<br>[Phone / Contact]</p>",
        "contentType": "html"
      },
      "metadata": {
        "designer": { "x": 2100, "y": 0 },
        "parameters": [],
        "restore": {}
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": true,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "eu1.make.com"
  }
}
