8
n8n 中文网amn8n.com

自动化SSL到期跟踪与通知

中级

这是一个SecOps, Miscellaneous, Multimodal AI领域的自动化工作流,包含 6 个节点。主要使用 If, Slack, GoogleSheets, ScheduleTrigger, SslChecker 等节点。 使用Google表格和Slack警报监控SSL证书到期日期

前置要求
  • Slack Bot Token 或 Webhook URL
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "IOXRitpoDfCIAWVb",
  "meta": {
    "instanceId": "584c88d9c6d3d6b187b85d8fb66968f47d2267f8a5ea40d3d59ea7a8bb53bd89",
    "templateCredsSetupCompleted": true
  },
  "name": "自动化 SSL 到期跟踪与通知",
  "tags": [
    "SSL",
    "Monitoring",
    "Google Sheets",
    "Slack",
    "Alerts",
    "Security",
    "Automation"
  ],
  "nodes": [
    {
      "id": "ac2e00ee-c5ac-4da2-9979-12798ba82da0",
      "name": "获取表中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        672,
        352
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FmbkG1mX7jg6jnAXQRIT-xgNXQ76yYgc62WPIW7rejI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID_HERE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FmbkG1mX7jg6jnAXQRIT-xgNXQ76yYgc62WPIW7rejI/edit?usp=drivesdk",
          "cachedResultName": "Domains"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "vLGnAicMfDhYEkYY",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "a9f88d0b-df4b-4f8d-b1eb-44d4d6d136aa",
      "name": "SSL 检查器",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.sslChecker",
      "position": [
        896,
        352
      ],
      "parameters": {
        "domain": "={{ $json.Website }}"
      },
      "credentials": {
        "customJsApi": {
          "id": "xKqs49emihktzryA",
          "name": "CustomJS account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dc582c07-53b5-478e-9cd3-5eb585b8be65",
      "name": "在表格中更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1104,
        352
      ],
      "parameters": {
        "columns": {
          "value": {
            "Website": "={{ $('Get row(s) in sheet').item.json.Website }}",
            "Days Left": "={{ $json.output.daysLeft }}",
            "row_number": "={{ $('Get row(s) in sheet').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Days Left",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Days Left",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FmbkG1mX7jg6jnAXQRIT-xgNXQ76yYgc62WPIW7rejI/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_ID_HERE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FmbkG1mX7jg6jnAXQRIT-xgNXQ76yYgc62WPIW7rejI/edit?usp=drivesdk",
          "cachedResultName": "Domains"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "vLGnAicMfDhYEkYY",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "f3353893-dff7-424a-856d-8c5f104f8431",
      "name": "发送消息",
      "type": "n8n-nodes-base.slack",
      "position": [
        1536,
        336
      ],
      "webhookId": "004604bb-8ca7-41ef-beb7-d32204e6da7c",
      "parameters": {
        "text": "=⏰ Reminder: SSL certificate of {{ $('Update row in sheet').item.json.Website }} will expire in {{ $json[\"Days Left\"] }} days.",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "SLACK_USER_ID",
          "cachedResultName": "SLACK_USER_ID"
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "lds6VN6PlAYmdplA",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "ee549621-3434-4bb7-9ef5-287c899fa382",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        448,
        352
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8b0284a5-c766-46e8-9e81-670dc6f629de",
      "name": "检查剩余天数阈值",
      "type": "n8n-nodes-base.if",
      "position": [
        1296,
        352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3ce0ef67-751d-4a37-959a-08427894f449",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json['Days Left'] }}",
              "rightValue": 8
            }
          ]
        }
      },
      "typeVersion": 2.2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bc7bd77c-af1e-479b-b8c7-14f6c6f7cfb0",
  "connections": {
    "SSL Checker": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        []
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "SSL Checker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Check Days Left Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Days Left Threshold": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 安全运维, 杂项, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量6
分类3
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流