{
  "name": "Send automated payment reminders for Xero invoices via Outlook email",
  "nodes": [
    {
      "id": "1a3db5de-8382-402f-b9cb-de802a862c36",
      "name": "Daily Invoice Check Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -560,
        720
      ]
    },
    {
      "id": "52ff9ea5-446b-4690-9314-a30304f22413",
      "name": "Fetch All Xero Invoices",
      "type": "n8n-nodes-base.xero",
      "position": [
        -336,
        720
      ]
    },
    {
      "id": "10c17a71-9f23-4a11-bd3a-39e319ea242e",
      "name": "Filter Out Paid Invoices",
      "type": "n8n-nodes-base.if",
      "position": [
        -112,
        720
      ]
    },
    {
      "id": "b4b36361-ddf1-423f-b40f-225e42d951f4",
      "name": "Filter Invoices Due Soon",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        720
      ]
    },
    {
      "id": "14901d07-21a0-41e0-a13d-356a8cd125d3",
      "name": "Calculate Days Until Due",
      "type": "n8n-nodes-base.code",
      "position": [
        128,
        720
      ]
    },
    {
      "id": "46c031b7-eb66-4906-ae88-221d4a0af6f7",
      "name": "Log Reminder in Xero History",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        864,
        704
      ]
    },
    {
      "id": "3434e3ea-3e5d-46f6-bd26-6a29f2ad9c1a",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        240
      ],
      "parameters": {
        "width": 460,
        "height": 1228,
        "content": "## Send Automated Payment Reminders for Overdue Xero Invoices\n\nThis workflow automatically monitors your Xero invoices and sends friendly payment reminders to customers when invoices are due within 7 "
      }
    },
    {
      "id": "3a9b87fd-f9df-4242-9605-4e7c5b1fe672",
      "name": "Step 1 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        432
      ],
      "parameters": {
        "width": 720,
        "height": 460,
        "content": "## Step 1: Daily Check & Filter\n\nTriggers at noon every day, fetches all invoices from Xero, and filters out invoices that are already marked as paid.\n\n**Customize:** Change the trigger time in the Sc"
      }
    },
    {
      "id": "1162f84f-e7e9-4fd3-a88b-0e5f0e160257",
      "name": "Step 2 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        432
      ],
      "parameters": {
        "width": 444,
        "height": 460,
        "content": "## Step 2: Calculate & Identify\n\nUses JavaScript to calculate how many days remain until each invoice is due and flags invoices that are due within the next 7 days.\n\n**Customize:** Change `diffDays <="
      }
    },
    {
      "id": "a4fac765-aaa8-47c7-af2a-bb8ebe1025c3",
      "name": "Step 3 Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        432
      ],
      "parameters": {
        "width": 544,
        "height": 460,
        "content": "## Step 3: Send & Log Reminders\n\nSends personalized email reminders to customers for invoices due within 7 days, then logs the reminder activity in Xero's invoice history for complete tracking.\n\n**Cus"
      }
    },
    {
      "id": "474fe1d1-32d8-4f2f-8255-0072e5310ddc",
      "name": "Send a message1",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        608,
        704
      ]
    }
  ],
  "connections": {
    "Send a message1": {
      "main": [
        [
          {
            "node": "Log Reminder in Xero History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Xero Invoices": {
      "main": [
        [
          {
            "node": "Filter Out Paid Invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Days Until Due": {
      "main": [
        [
          {
            "node": "Filter Invoices Due Soon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Invoices Due Soon": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out Paid Invoices": {
      "main": [
        [
          {
            "node": "Calculate Days Until Due",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Invoice Check Trigger": {
      "main": [
        [
          {
            "node": "Fetch All Xero Invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}