{
  "name": "Workflow to automate overdue invoice reminders (mahirmunaj.com)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1-5"
            }
          ]
        }
      },
      "id": "debb3fa0-bc2f-5a32-a5b1-6e3af98a313b",
      "name": "Every weekday 9am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_SHEET_ID"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Invoices"
        },
        "options": {}
      },
      "id": "cf76ea8a-1a55-519b-8c2d-35c55b1f7285",
      "name": "Read invoices",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        220,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false
          },
          "conditions": [
            {
              "id": "1",
              "leftValue": "={{ $json.status }}",
              "rightValue": "unpaid",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "id": "2",
              "leftValue": "={{ new Date($json.due_date) < new Date() }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "bfb921b0-8e6b-5ce8-a512-1f9cc1374852",
      "name": "Unpaid and overdue?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        440,
        300
      ]
    },
    {
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "subject": "=Friendly reminder: invoice {{ $json.invoice }}",
        "emailType": "text",
        "message": "=Hi {{ $json.client }},\n\nA quick reminder that invoice {{ $json.invoice }} for {{ $json.amount }} was due on {{ $json.due_date }}. You can pay here: {{ $json.pay_link }}\n\nIf it's already paid, please ignore this. Thank you!",
        "options": {}
      },
      "id": "bc43f8cc-1015-5dd9-a121-c42c1ee628ed",
      "name": "Email reminder",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        660,
        220
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#finance"
        },
        "text": "=💸 Reminder sent to {{ $('Unpaid and overdue?').item.json.client }} for invoice {{ $('Unpaid and overdue?').item.json.invoice }}",
        "otherOptions": {}
      },
      "id": "3d67b5d1-6c4d-550d-a70c-3b6875724f30",
      "name": "Daily summary to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        880,
        220
      ]
    }
  ],
  "connections": {
    "Every weekday 9am": {
      "main": [
        [
          {
            "node": "Read invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read invoices": {
      "main": [
        [
          {
            "node": "Unpaid and overdue?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unpaid and overdue?": {
      "main": [
        [
          {
            "node": "Email reminder",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Email reminder": {
      "main": [
        [
          {
            "node": "Daily summary to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false,
    "source": "https://mahirmunaj.com/templates/n8n-overdue-invoice-reminder-workflow"
  }
}