AWS ACM 证书自动续期(含 Slack 审批)
中级
这是一个SecOps, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Slack, Filter, ScheduleTrigger, AwsCertificateManager 等节点。 带 Slack 审批工作流的 AWS 证书自动续期
前置要求
- •Slack Bot Token 或 Webhook URL
- •AWS Access Key 和 Secret
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "Rptc1H55PaNYDVZa",
"meta": {
"instanceId": "4a2e6764ba7a6bc9890d9225f4b21d570ce88fc9bd57549c89057fcee58fed0f",
"templateCredsSetupCompleted": true
},
"name": "AWS ACM 证书自动续期(含 Slack 审批)",
"tags": [],
"nodes": [
{
"id": "19f3e8a0-5957-4c10-8d09-75d88a55402e",
"name": "计划触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "76302994-4f45-4353-8b5e-f253fbf28b5a",
"name": "续期证书",
"type": "n8n-nodes-base.awsCertificateManager",
"position": [
1184,
0
],
"parameters": {
"certificateArn": "={{ $('Cert expire in next 7 days?').item.json.CertificateArn }}"
},
"credentials": {
"aws": {
"id": "IZYsJuHhfVJ3PIrC",
"name": "AWS account"
}
},
"typeVersion": 1
},
{
"id": "0620ba39-d94d-4876-a802-b6cc1100e9a9",
"name": "获取多个证书",
"type": "n8n-nodes-base.awsCertificateManager",
"position": [
240,
0
],
"parameters": {
"options": {},
"operation": "getMany"
},
"credentials": {
"aws": {
"id": "IZYsJuHhfVJ3PIrC",
"name": "AWS account"
}
},
"typeVersion": 1
},
{
"id": "6d3e2484-43da-4a0e-8e92-175b4d1ec3fe",
"name": "发送消息并等待响应",
"type": "n8n-nodes-base.slack",
"position": [
880,
0
],
"webhookId": "768d9aee-c2e3-4b84-8afc-d0fdf1e5964b",
"parameters": {
"user": {
"__rl": true,
"mode": "list",
"value": "U054RMBTVBM",
"cachedResultName": "trung.tran"
},
"message": "=:warning: *AWS ACM Certificate Expiry Alert* :warning:\n\nThe following ACM certificate will expire soon and requires renewal:\n\n*Domain Name:* {{ $json.DomainName }}\n*Alternate Names:* {{ $json.SubjectAlternativeNameSummaries }}\n*Certificate ARN:* {{ $json.CertificateArn }}\n*Key Algorithm:* {{ $json.KeyAlgorithm }}\n*Status:* {{ $json.Status }}\n*Issued At:* {{ $json.IssuedAt.toDateTime('s')}}\n*Expires At:* {{ $json.NotAfter.toDateTime('s')}}\n\nPlease confirm renewal action to proceed.",
"options": {},
"operation": "sendAndWait",
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "4JSKt9sIRV1KGswQ",
"name": "Slack account"
}
},
"typeVersion": 2.3
},
{
"id": "6e47976b-6eb8-4a42-a777-b23e857f9651",
"name": "证书在 7 天内过期?",
"type": "n8n-nodes-base.filter",
"position": [
528,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "fe1b749d-3046-465e-b60a-786f5b0e2f99",
"operator": {
"type": "dateTime",
"operation": "before"
},
"leftValue": "={{ $json.NotAfter.toDateTime('s') }}",
"rightValue": "={{ $today.plus(7,'days') }}"
},
{
"id": "8db3e990-dca3-4c23-9d62-e4d25a807588",
"operator": {
"type": "dateTime",
"operation": "before"
},
"leftValue": "={{ $json.NotBefore.toDateTime('s') }}",
"rightValue": "={{ $today }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5a336509-7d02-4c62-8198-04ad2750682f",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1136,
-576
],
"parameters": {
"width": 928,
"height": 1616,
"content": "# AWS ACM 证书自动续期(含 Slack 审批)"
},
"typeVersion": 1
},
{
"id": "158aa163-42cb-42d6-b915-c1525983e069",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
192
],
"parameters": {
"width": 272,
"content": "### 1. 计划触发器"
},
"typeVersion": 1
},
{
"id": "38d53502-a32b-4734-a63b-d362f0c16f7d",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
192
],
"parameters": {
"width": 256,
"content": "### 2. 获取证书"
},
"typeVersion": 1
},
{
"id": "c41f8bcd-9473-45a5-b8da-08090d024955",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
192
],
"parameters": {
"content": "### 3. 过滤即将过期的证书"
},
"typeVersion": 1
},
{
"id": "8b46936f-4dfd-44ea-bdda-cd35209d7c61",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
832,
192
],
"parameters": {
"content": "### 4. 通过 Slack 通知并等待审批"
},
"typeVersion": 1
},
{
"id": "4de9462c-89e2-4a78-87c1-eaeaf0b418a5",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
192
],
"parameters": {
"content": "### 5. 续期证书"
},
"typeVersion": 1
},
{
"id": "d72ec217-74be-481b-bb17-d640a80dfede",
"name": "通知 IT 管理员",
"type": "n8n-nodes-base.slack",
"position": [
1456,
0
],
"webhookId": "eacf27c7-db94-47bd-89ad-6f497815398c",
"parameters": {
"text": "=:white_check_mark: *ACM Certificate Renewed Successfully*\n\n*Domain:* {{ $('Cert expire in next 7 days?').item.json.DomainName }}\n*ARN:* {{ $('Cert expire in next 7 days?').item.json.CertificateArn }}\n*Previous Expiry:* {{ $('Cert expire in next 7 days?').item.json.NotAfter.toDateTime('s') }}\n*Renewed At:* {{ $now }}\n\nApproved by: {{ $('Send message and wait for response').item.json.user?.name || $('Send message and wait for response').item.json.username || 'N/A' }}",
"user": {
"__rl": true,
"mode": "list",
"value": "U054RMBTVBM",
"cachedResultName": "trung.tran"
},
"select": "user",
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "4JSKt9sIRV1KGswQ",
"name": "Slack account"
}
},
"typeVersion": 2.3
},
{
"id": "5b0e2374-fc3a-49e5-8538-65551f9d5422",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
-32
],
"parameters": {
"width": 624,
"height": 192,
"content": ""
},
"typeVersion": 1
},
{
"id": "8fd13176-f90c-4fea-bb42-c13d98488d33",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1424,
192
],
"parameters": {
"content": "### 6. 通过 Slack 通知管理员"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e61ccea4-43f6-410d-9036-90d750e3837b",
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Get many certificates",
"type": "main",
"index": 0
}
]
]
},
"Renew a certificate": {
"main": [
[
{
"node": "Inform IT Admin",
"type": "main",
"index": 0
}
]
]
},
"Get many certificates": {
"main": [
[
{
"node": "Cert expire in next 7 days?",
"type": "main",
"index": 0
}
]
]
},
"Cert expire in next 7 days?": {
"main": [
[
{
"node": "Send message and wait for response",
"type": "main",
"index": 0
}
]
]
},
"Send message and wait for response": {
"main": [
[
{
"node": "Renew a certificate",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 安全运维, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
用于 MFA 强制实施和访问密钥停用的自动化 AWS IAM 合规工作流
AWS IAM 合规自动化:强制 MFA 并清理访问密钥
Code
Slack
Aws Iam
+4
19 节点Trung Tran
安全运维
AWS IAM 非活跃用户自动化告警工作流
监控 AWS IAM 非活跃用户并通过 Slack 发送告警
If
Slack
Aws Iam
+5
16 节点Trung Tran
安全运维
AWS IAM访问密钥轮换提醒自动化工作流
为超过365天的AWS IAM访问密钥发送Slack警报
If
Slack
Aws Iam
+5
14 节点Trung Tran
安全运维
清理过期的 AWS ACM 证书并需 Slack 批准
通过 Slack 批准清理过期的 AWS ACM 证书
Slack
Filter
Schedule Trigger
+2
14 节点Trung Tran
开发运维
带聊天机器人和 GPT-4.1 的自动化 Slack 频道审核工作流
自动化Slack频道闲置审核与报告生成,用于工作区清理
Code
Slack
Filter
+2
16 节点Trung Tran
AI 摘要总结
AWS 自动化 SSL/TLS 证书过期报告
使用 AWS ACM 和 AI 为 Slack 和邮件生成 SSL/TLS 证书过期报告
Set
Code
Slack
+8
23 节点Trung Tran
AI 摘要总结
工作流信息
难度等级
中级
节点数量14
分类2
节点类型5
作者
Trung Tran
@trungtranEmpowering small and medium businesses with smart automation and practical AI, no big tech team required.
外部链接
在 n8n.io 查看 →
分享此工作流