8
n8n 中文网amn8n.com

我的工作流

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 26 个节点。主要使用 If, Code, Switch, Webhook, Postgres 等节点。 使用Postgres和Telegram创建安全的人工审批流程

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • PostgreSQL 数据库连接信息
  • Telegram Bot Token
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "9c8d0d4640139c59e2bc183c0a14df0fbc0573cb91e494f5db8144fe78fe28ca"
  },
  "name": "我的工作流",
  "tags": [],
  "nodes": [
    {
      "id": "411a0468-c67b-4762-93e2-1d4e116f1181",
      "name": "01 Webhook 触发器:审批决策",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1808,
        400
      ],
      "webhookId": "12e347b0-b52a-4a2e-b096-4c5448f9641f",
      "parameters": {
        "path": "/approval",
        "options": {
          "responseData": "✅ Thanks, your decision was recorded."
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "08db80ea-aad6-45f7-973a-a0fbfa9285e0",
      "name": "02 FN:验证签名 + TTL",
      "type": "n8n-nodes-base.code",
      "position": [
        -1584,
        400
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "import hashlib\nimport hmac\nimport time\nimport os\n\nsecret = os.getenv(\"SECRET_KEY\")\nif not secret:\n    raise ValueError(\"SECRET_KEY environment variable not set\")\nnow = int(time.time())\n\nout = []\n\nfor item in items:\n    q = item[\"json\"].get(\"query\", {})\n    cid = q.get(\"cid\")\n    status = q.get(\"status\")\n    action = q.get(\"action\")\n    exp = int(q.get(\"exp\", \"0\"))\n    sig = q.get(\"sig\")\n\n    payload = f\"{cid}|{status}|{exp}\"\n    check_sig = hmac.new(secret.encode(), payload.encode(), hashlib.sha256).hexdigest()\n\n    # Default result\n    result = {\n        \"correlation_id\": cid,\n        \"new_status\": status,\n        \"reason\": None\n    }\n\n    if sig != check_sig:\n        result[\"action\"] = \"invalid\"\n        result[\"reason\"] = \"Invalid signature\"\n    elif exp < now:\n        result[\"action\"] = \"expired\"\n        result[\"reason\"] = \"Link expired\"\n    elif action == \"approve\":\n        result[\"action\"] = \"approve\"\n        result[\"actor\"] = \"manager\"  # later replace with real manager identity\n    elif action == \"reject\":\n        result[\"action\"] = \"reject\"\n        result[\"actor\"] = \"manager\"\n    else:\n        result[\"action\"] = \"unknown\"\n        result[\"reason\"] = \"Unsupported action\"\n\n    out.append({\"json\": result})\n\nreturn out\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3b7594c2-07c0-4baa-906b-daacff925853",
      "name": "04c 数据库:更新工单状态",
      "type": "n8n-nodes-base.postgres",
      "notes": "Updates ticket status by correlation ID. Also inserts audit row and notifies ticket owner. Requires tickets table and audit schema.",
      "position": [
        -896,
        192
      ],
      "parameters": {
        "query": "UPDATE tickets\nSET status = $2, updated_at = NOW()\nWHERE correlation_id = $1::uuid\nRETURNING id, status, updated_at, correlation_id;\n",
        "options": {
          "queryReplacement": "={{$json.correlation_id}},{{$json.new_status}}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 2.6
    },
    {
      "id": "17b6b2df-3792-4460-8f55-c32422d3ba2f",
      "name": "04c1 数据库:获取工单负责人",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -448,
        192
      ],
      "parameters": {
        "query": "SELECT chat_id, correlation_id, status, subject\nFROM tickets\nWHERE correlation_id = $1::uuid;",
        "options": {
          "queryReplacement": "={{ $('04c DB: Update Ticket Status').item.json.correlation_id }}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "19802b0c-d66b-4a6a-b009-8d7f721abcca",
      "name": "04c1a 条件判断:已解决或进行中",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "115bb477-3dfa-4d9b-8e4b-cd2ef15439e1",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json[\"status\"] }}",
              "rightValue": "resolved"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "da2d1a92-a349-40ba-8160-63847c560a23",
      "name": "05c1a Telegram:通知已解决",
      "type": "n8n-nodes-base.telegram",
      "notes": "Sends user-facing messages back to Telegram. Content depends on workflow branch (acknowledgment, errors, updates).",
      "position": [
        224,
        0
      ],
      "webhookId": "834b2795-7e52-4264-b787-7280bf60de36",
      "parameters": {
        "text": "=🎉 Good news! Your ticket (<code>{{ $json.correlation_id }}</code>) has been resolved.  \nYou can check details anytime with:  \n/status <code>{{ $json.correlation_id }}</code>",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.2
    },
    {
      "id": "e2290e2c-1572-46ac-b690-46626ede3a35",
      "name": "05c1b Telegram:通知进行中",
      "type": "n8n-nodes-base.telegram",
      "notes": "Sends user-facing messages back to Telegram. Content depends on workflow branch (acknowledgment, errors, updates).",
      "position": [
        224,
        192
      ],
      "webhookId": "560dda9b-b8e5-4e5b-9705-4d6ed17ce50d",
      "parameters": {
        "text": "=🔄 Your ticket (<code>{{ $json.correlation_id }}.</code>) is now being worked on.  \nWe’ll notify you once it’s resolved.",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.2
    },
    {
      "id": "828e2442-5f9e-4d12-a671-57b90d49e807",
      "name": "05c Telegram:更新确认",
      "type": "n8n-nodes-base.telegram",
      "notes": "Sends user-facing messages back to Telegram. Content depends on workflow branch (acknowledgment, errors, updates).",
      "position": [
        -224,
        288
      ],
      "webhookId": "2e047d36-651f-4c1e-9970-8adf7029c70c",
      "parameters": {
        "text": "=✅ <b>Ticket <code>{{ $json.correlation_id }}</code></b> updated!\n📌 <b>New Status:</b> {{ $json[\"status\"] }}\n⏰ <b>Updated At:</b> {{ new Date($(\"04c DB: Update Ticket Status\").item.json.updated_at).toLocaleString() }}\n",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.2
    },
    {
      "id": "7c2d91ca-0014-4d8d-97a4-bbd479274f88",
      "name": "通知失败?",
      "type": "n8n-nodes-base.if",
      "position": [
        448,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4eb644e5-1340-492e-96e7-66198d2d72ad",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ !!$json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "16995a07-e4ed-4ebc-88a4-ce430ab0eee0",
      "name": "执行 SQL 查询",
      "type": "n8n-nodes-base.postgres",
      "position": [
        672,
        96
      ],
      "parameters": {
        "query": "INSERT INTO workflow_errors \n  (workflow_id, workflow_name, execution_id, error_message, json_payload)\nVALUES \n  ($1, $2, $3, $4, $5::jsonb);\n",
        "options": {
          "queryReplacement": "={{ $workflow.id }},\n{{ $workflow.name }},\n{{ $execution.id }},\n{{ $json.error?.message || 'unknown' }},\n{{ JSON.stringify($json) }}\n"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "1ba78ac5-24f1-4b4a-bc2b-ce8e14419884",
      "name": "04c2 数据库:插入审计记录",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -672,
        192
      ],
      "parameters": {
        "query": "INSERT INTO ticket_audit\n  (ticket_id, correlation_id, action, new_status, actor_chat_id)\nVALUES\n  ($1, $2, 'update', $3, $4);\n",
        "options": {
          "queryReplacement": "={{ $json.id }},\n{{ $json.correlation_id }},\n{{ $json.status }},\n{{ $('02 FN: Verify Signature + TTL').item.json.actor }}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "d9707ad4-fe4b-4335-90ff-aeba6d90cffc",
      "name": "文本(拒绝)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -448,
        384
      ],
      "webhookId": "ec8dcd4d-28ad-478c-a1b5-0e87133ff7c5",
      "parameters": {
        "text": "=❌ Manager rejected update.\nTicket <code>{{ $('02 FN: Verify Signature + TTL').item.json.correlation_id }}</code> stays unchanged.",
        "chatId": "chat_id",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ccc7b9c3-107b-48cf-b52b-12e86547d378",
      "name": "04r0 数据库:获取工单 ID",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -896,
        384
      ],
      "parameters": {
        "query": "SELECT id, correlation_id \nFROM tickets \nWHERE correlation_id = $1::uuid;",
        "options": {
          "queryReplacement": "={{$json.correlation_id}}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "3e11f388-20d3-46e3-b41c-be7602b5b6bf",
      "name": "执行 SQL 查询1",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -672,
        384
      ],
      "parameters": {
        "query": "INSERT INTO ticket_audit \n  (ticket_id, correlation_id, action, new_status, actor_chat_id)\nVALUES \n  ($1, $2, 'reject', $3, $4);\n",
        "options": {
          "queryReplacement": "={{$json.id}},  {{$json.correlation_id}},  {{ $('02 FN: Verify Signature + TTL').item.json.new_status }},  {{ $('02 FN: Verify Signature + TTL').item.json.actor }}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "6b3aedec-d739-486c-ba9a-854a87973e1c",
      "name": "如果已解决",
      "type": "n8n-nodes-base.if",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "dc1d552d-728a-46cd-9024-14d88b01f77f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json[\"status\"] }}",
              "rightValue": "resolved"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "34b8c0a5-478d-4354-89f0-d053c75a9880",
      "name": "如果进行中",
      "type": "n8n-nodes-base.if",
      "position": [
        0,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a4a97bc7-96b5-4e5b-8ade-fd4f9d292016",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json[\"status\"] }}",
              "rightValue": "in_progress"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0c522006-2356-4235-a8d9-57e0399439b9",
      "name": "操作",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1360,
        368
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "approve",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b720a50f-1e38-477b-b828-f85c8e4e10d9",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"action\"] }}",
                    "rightValue": "approve"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "reject",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1f0d9637-5986-4e90-9f64-3829a12c15ef",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"action\"] }}",
                    "rightValue": "reject"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "expired",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "2ad38675-da19-4380-882c-0c3da132eea1",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"action\"] }}",
                    "rightValue": "expired"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "invalid",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "74c8e5cd-1441-43ef-bf17-98956cf7e63c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json[\"action\"] }}",
                    "rightValue": "invalid"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "5a1ead63-50e5-4740-8a62-6d8390496901",
      "name": "04e 数据库:插入审计过期记录",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -896,
        576
      ],
      "parameters": {
        "query": "INSERT INTO ticket_audit\n  (correlation_id, action, new_status, actor_chat_id)\nVALUES\n  ($1, 'expired', $2, 'system');\n",
        "options": {
          "queryReplacement": "={{ $json.correlation_id }}, {{ $json.new_status }}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "ca421ae6-3163-410d-bf0d-a4896adc16fa",
      "name": "04i 数据库:插入审计无效记录",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -896,
        768
      ],
      "parameters": {
        "query": "INSERT INTO ticket_audit\n  (correlation_id, action, new_status, actor_chat_id)\nVALUES\n  ($1, 'invalid', $2, 'system');\n",
        "options": {
          "queryReplacement": "={{ $json.correlation_id }}, {{ $json.new_status }}"
        },
        "operation": "executeQuery"
      },
      "credentials": {
        "postgres": {
          "id": "DeyLRt5YrGqjUrds",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "553fa208-5f0c-4a79-aeed-5e03477ad32a",
      "name": "05e Telegram:通知过期",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -672,
        576
      ],
      "webhookId": "b98a6506-35d0-41a8-8807-574cf8bb60db",
      "parameters": {
        "text": "=⏰ Manager notice: approval link expired for ticket <code>{{ $('02 FN: Verify Signature + TTL').item.json.correlation_id }}</code>.",
        "chatId": "chat_id",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "00c9e4e8-3b06-4df5-a2b6-3d831084ac45",
      "name": "05i Telegram:警报无效",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -672,
        768
      ],
      "webhookId": "964c3124-8fd4-4e92-b310-8ff4fa58cba0",
      "parameters": {
        "text": "=🚨 Invalid approval attempt detected.\nTicket: <code>{{ $('02 FN: Verify Signature + TTL').item.json.correlation_id }}</code>",
        "chatId": "chat_id",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "PEoTj5wxpFTeQVpI",
          "name": "Ticket Intake"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "625211e5-1974-43b0-9855-1ce71577e3f3",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4272,
        256
      ],
      "parameters": {
        "width": 832,
        "height": 576,
        "content": "## 🛑 人工介入审批流程 (n8n + Postgres + Telegram)"
      },
      "typeVersion": 1
    },
    {
      "id": "fb72674c-6184-4754-9c02-61a9382764d4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        160
      ],
      "parameters": {
        "color": 5,
        "height": 224,
        "content": "### 🔐 安全说明"
      },
      "typeVersion": 1
    },
    {
      "id": "a87e7f7c-ed16-47db-a3ff-f634c8fcc999",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        576
      ],
      "parameters": {
        "color": 4,
        "height": 256,
        "content": "### 📲 Telegram 聊天 ID"
      },
      "typeVersion": 1
    },
    {
      "id": "c1f22f77-f5b9-4b70-ae85-e49cbe888894",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2144,
        368
      ],
      "parameters": {
        "height": 304,
        "content": "### 🔑 生成审批链接"
      },
      "typeVersion": 1
    },
    {
      "id": "5c439394-3545-4abb-a65b-0fecbe36a979",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3392,
        256
      ],
      "parameters": {
        "color": 5,
        "width": 1168,
        "height": 1568,
        "content": "## 🛠 分步设置(适合初学者)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Actions": {
      "main": [
        [
          {
            "node": "04c DB: Update Ticket Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "04r0 DB: Get Ticket ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "04e DB: Insert Audit Expired",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "04i DB: Insert Audit Invalid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Resolved": {
      "main": [
        [
          {
            "node": "05c1a Telegram: Notify Resolved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If in_progress": {
      "main": [
        [
          {
            "node": "05c1b Telegram: Notify In Progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Failed?": {
      "main": [
        [
          {
            "node": "Execute a SQL query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute a SQL query1": {
      "main": [
        [
          {
            "node": "Text (reject)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04r0 DB: Get Ticket ID": {
      "main": [
        [
          {
            "node": "Execute a SQL query1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04c1 DB: Get Ticket Owner": {
      "main": [
        [
          {
            "node": "04c1a IF: Resolved or In Progress",
            "type": "main",
            "index": 0
          },
          {
            "node": "05c Telegram: Update Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04c2 DB: Insert Audit Row": {
      "main": [
        [
          {
            "node": "04c1 DB: Get Ticket Owner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04c DB: Update Ticket Status": {
      "main": [
        [
          {
            "node": "04c2 DB: Insert Audit Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04e DB: Insert Audit Expired": {
      "main": [
        [
          {
            "node": "05e Telegram: Notify Expired",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04i DB: Insert Audit Invalid": {
      "main": [
        [
          {
            "node": "05i Telegram: Alert Invalid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "02 FN: Verify Signature + TTL": {
      "main": [
        [
          {
            "node": "Actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "05c1a Telegram: Notify Resolved": {
      "main": [
        [
          {
            "node": "Notify Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04c1a IF: Resolved or In Progress": {
      "main": [
        [
          {
            "node": "If Resolved",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If in_progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "05c1b Telegram: Notify In Progress": {
      "main": [
        [
          {
            "node": "Notify Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "01 Webhook Trigger: Approval Decision": {
      "main": [
        [
          {
            "node": "02 FN: Verify Signature + TTL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量26
分类2
节点类型7
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者

Automation consultant specializing in n8n workflows that save businesses time and reduce costs. Experienced in designing ticketing systems, email parsers, and integrations with Postgres, Telegram, and APIs. I publish workflows to help teams streamline operations and build internal efficiency.

外部链接
在 n8n.io 查看

分享此工作流