{
  "name": "\ud83d\udd25 IT \u7701\u529b\u5de5\u5177\uff01SSL \u6191\u8b49\u7ba1\u7406\u8207\u6191\u8b49\u904e\u671f\u901a\u77e5\u81ea\u52d5\u5316",
  "nodes": [
    {
      "parameters": {},
      "id": "f339d618-cf80-4662-be8b-f630646b2dde",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        780,
        920
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/1kwCcuhCGuTq_7QzMzs9-UbN8oWOxwIbtfnbQDJTJ66Q",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "URL",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "URL": "={{ $('Fetch URLs').item.json.URL }}",
            "\u540d\u7a31": "={{ $('Fetch URLs').item.json[\"\u540d\u7a31\"] }}",
            "SSL\u8a8d\u8b49\u7d44\u7e54": "={{ $json.result.issuer_o }}",
            "\u8a8d\u8b49\u958b\u59cb\u671f\u9650": "={{ $json.result.valid_from }}",
            "\u8a8d\u8b49\u5931\u6548\u671f\u9650": "={{ $json.result.valid_till }}"
          },
          "matchingColumns": [
            "\u540d\u7a31"
          ],
          "schema": [
            {
              "id": "\u540d\u7a31",
              "displayName": "\u540d\u7a31",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "URL",
              "displayName": "URL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "SSL\u8a8d\u8b49\u7d44\u7e54",
              "displayName": "SSL\u8a8d\u8b49\u7d44\u7e54",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u8a8d\u8b49\u958b\u59cb\u671f\u9650",
              "displayName": "\u8a8d\u8b49\u958b\u59cb\u671f\u9650",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "\u8a8d\u8b49\u5931\u6548\u671f\u9650",
              "displayName": "\u8a8d\u8b49\u5931\u6548\u671f\u9650",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "34fecc81-e4c1-4c61-9563-48042587c024",
      "name": "URLs to Monitor",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1640,
        920
      ],
      "typeVersion": 4.5,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/1kwCcuhCGuTq_7QzMzs9-UbN8oWOxwIbtfnbQDJTJ66Q",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "URL",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1kwCcuhCGuTq_7QzMzs9-UbN8oWOxwIbtfnbQDJTJ66Q/edit#gid=0"
        },
        "options": {}
      },
      "id": "072ba6a0-8f08-49a6-839c-a007c2f2d1ba",
      "name": "Fetch URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        920
      ],
      "typeVersion": 4.5,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "=https://ssl-checker.io/api/v1/check/{{ $json[\"URL\"].replace(/^https?:\\/\\//, \"\").replace(/\\/$/, \"\") }}",
        "options": {}
      },
      "id": "d7a64fb5-0c71-4d1a-8383-585440466b0f",
      "name": "Check SSL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1300,
        920
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ee6e2ce8-569a-4f1f-91b5-2c55f605a16b",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.result.days_left }}",
              "rightValue": 7
            }
          ]
        },
        "options": {}
      },
      "id": "ff79c4bc-8694-43e0-810f-9574ffc3c3dd",
      "name": "Expiry Alert",
      "type": "n8n-nodes-base.if",
      "position": [
        1660,
        1300
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "sendTo": "n8n-automation@example.com",
        "subject": "=SSL {{ $json.result.days_left }} \u5929\u5f8c\u904e\u671f - {{ $json.result.host }}",
        "emailType": "text",
        "message": "=\u8acb\u78ba\u8a8d\u8a72\u7db2\u57df\uff1a{{ $json.result.host }}\n\u518d\u904e {{ $json.result.days_left }} \u5929\u5f8c\u5373\u5c07\u904e\u671f\uff0c\u8acb\u5118\u901f\u8655\u7406\nhttps://docs.google.com/spreadsheets/d/1kwCcuhCGuTq_7QzMzs9-UbN8oWOxwIbtfnbQDJTJ66Q",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "10c1bf0e-3191-4430-a7c8-ec4c262091cc",
      "name": "Send Alert Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1920,
        1280
      ],
      "typeVersion": 2.1,
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "f9a6cc4e-430f-4a03-a05f-12f58fd2d490",
      "name": "Dayly Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        780,
        1140
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "content": "## Step1 - \u6bcf\u5929\u64f7\u53d6\u7db2\u7ad9\u7db2\u57df\u6e05\u55ae\n",
        "height": 600,
        "width": 570,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        660,
        740
      ],
      "id": "ffe89013-7002-48fe-99fa-4e20a1b33db5",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Step2 - \u4f7f\u7528  SSL-Checker.io \u78ba\u8a8d\u7db2\u7ad9 SSL \u72c0\u6cc1\n",
        "height": 440,
        "width": 670
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1240,
        740
      ],
      "id": "c4b22c5a-f571-49e7-a878-47943e6e64d0",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Step3 - \u5bc4\u9001\u90f5\u4ef6\u901a\u77e5\uff0cSSL\u5c07\u57287\u5929\u5167\u904e\u671f\u7684\u7db2\u57df ",
        "height": 340,
        "width": 640,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1500,
        1180
      ],
      "id": "fbdc0179-d3db-4a11-8371-0f787c567a25",
      "name": "Sticky Note5"
    }
  ],
  "connections": {
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Fetch URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch URLs": {
      "main": [
        [
          {
            "node": "Check SSL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check SSL": {
      "main": [
        [
          {
            "node": "URLs to Monitor",
            "type": "main",
            "index": 0
          },
          {
            "node": "Expiry Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Expiry Alert": {
      "main": [
        [
          {
            "node": "Send Alert Email",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Dayly Trigger": {
      "main": [
        [
          {
            "node": "Fetch URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Taipei",
    "callerPolicy": "workflowsFromSameOwner",
    "executionTimeout": 300,
    "errorWorkflow": "0fS0IZwY5xyvbexo"
  },
  "versionId": "1f885224-fe3f-416e-a69d-a014d5167650",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "QjK6A8lwdsyCBXHu",
  "tags": [
    {
      "createdAt": "2025-02-08T08:50:12.969Z",
      "updatedAt": "2025-02-08T08:50:12.969Z",
      "id": "MsjujtEapjDx89km",
      "name": "YT"
    }
  ]
}