{
  "name": "Monitor website performance with PageSpeed Insights and send alerts",
  "nodes": [
    {
      "id": "dfbcd954-aefb-45c0-b0cd-b8f7374e6126",
      "name": "Main Template Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        -224
      ],
      "parameters": {
        "width": 700,
        "height": 1764,
        "content": "# Monitor website performance with PageSpeed Insights and save to Google Sheets with alerts\n\nThis n8n template automatically monitors website performance using Google's PageSpeed Insights API, compile"
      }
    },
    {
      "id": "d1cedc16-b144-4a4f-8506-be91607bd7db",
      "name": "On-Demand Testing Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        960
      ],
      "parameters": {
        "width": 600,
        "height": 112,
        "content": "## On-Demand Testing\n\nWebhook endpoint for immediate single-URL performance testing"
      }
    },
    {
      "id": "2ffb1551-9549-49a9-aeee-fdb5c12a87bf",
      "name": "Format Webhook Input",
      "type": "n8n-nodes-base.set",
      "position": [
        672,
        1136
      ]
    },
    {
      "id": "8ae6a002-9201-4adb-8cca-369097c6bbeb",
      "name": "Run On-Demand Test",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        1136
      ]
    },
    {
      "id": "7994e14d-6cfc-4db8-9fcb-da673ac03a98",
      "name": "Process On-Demand Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1072,
        1136
      ]
    },
    {
      "id": "58e18dcc-9fce-4648-a3b9-51754f2e6c2b",
      "name": "Return Audit Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1280,
        1136
      ]
    },
    {
      "id": "ae4b5083-903d-450b-8cc0-b9f49aaf714a",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        464,
        1136
      ]
    },
    {
      "id": "e8b625d3-44fa-4599-accf-ea576a05708b",
      "name": "Scheduled Audit Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -208
      ],
      "parameters": {
        "width": 600,
        "height": 144,
        "content": "## Scheduled Audit Workflow\n\nAutomatically tests all websites from Google Sheet on a defined schedule. \n\nSelect your prefereed interval."
      }
    },
    {
      "id": "505706c1-0d0f-48c6-8585-b44cb98d114d",
      "name": "Run PageSpeed Test",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1360,
        64
      ]
    },
    {
      "id": "711ea54b-01aa-424d-904c-be5d30a6c1b9",
      "name": "Process Audit Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1648,
        64
      ]
    },
    {
      "id": "882e6e4f-a9a6-4dd8-abd3-ab4262781b7d",
      "name": "Save Audit Results",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1904,
        64
      ]
    },
    {
      "id": "24a4a27d-d746-4d8b-a4a3-df33086f29db",
      "name": "Check Alert Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        2352,
        64
      ]
    },
    {
      "id": "2ddf6c22-2094-47d6-a1ce-32e01693e43b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        464,
        64
      ]
    },
    {
      "id": "28198a35-077b-46bb-8f26-b0a4fc432d52",
      "name": "Filter Unprocessed Sites",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        64
      ]
    },
    {
      "id": "7988d3d0-5f19-49d4-a189-4d43d419a8d0",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2656,
        -32
      ]
    },
    {
      "id": "5ffb3bca-94ea-427f-b0d6-07b77beacfb7",
      "name": "Scheduled Audit Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2848,
        -48
      ],
      "parameters": {
        "width": 328,
        "height": 128,
        "content": "## Choose what works for you\n\nSend an email or a Slack notification."
      }
    },
    {
      "id": "d8c76ba1-07bc-4905-a968-bea291565885",
      "name": "Scheduled Audit Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        224
      ],
      "parameters": {
        "width": 392,
        "height": 432,
        "content": "### Filter Unprocessed Sites\n\n**Purpose**: Prevents duplicate processing on the same day while allowing re-processing on future days.\nHow it works:\n\nCompares today's date (YYYY-MM-DD format) with each"
      }
    },
    {
      "id": "7215e78a-e6b7-4725-9f99-1152aac6d1e6",
      "name": "Load Sites from Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        704,
        64
      ]
    },
    {
      "id": "9fcc0d28-480e-4674-a2d1-74a795afd90a",
      "name": "Skip Alert (Performance OK)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2656,
        160
      ]
    },
    {
      "id": "8e4cac66-8c85-418e-9a42-54fd3352496f",
      "name": "Update Audit Date",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2144,
        64
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Format Webhook Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Load Sites from Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Audit Date": {
      "main": [
        [
          {
            "node": "Check Alert Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run On-Demand Test": {
      "main": [
        [
          {
            "node": "Process On-Demand Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run PageSpeed Test": {
      "main": [
        [
          {
            "node": "Process Audit Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Audit Results": {
      "main": [
        [
          {
            "node": "Update Audit Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Webhook Input": {
      "main": [
        [
          {
            "node": "Run On-Demand Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Alert Threshold": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Skip Alert (Performance OK)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Audit Results": {
      "main": [
        [
          {
            "node": "Save Audit Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unprocessed Sites": {
      "main": [
        [
          {
            "node": "Run PageSpeed Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process On-Demand Results": {
      "main": [
        [
          {
            "node": "Return Audit Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Sites from Google Sheet": {
      "main": [
        [
          {
            "node": "Filter Unprocessed Sites",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}