8
n8n 中文网amn8n.com

旧WordPress文章自动归档至草稿状态

中级

这是一个File Management, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 If, EmailSend, Wordpress, ScheduleTrigger 等节点。 旧WordPress文章自动归档至草稿状态

前置要求
  • 无特殊前置要求,导入即可使用
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "48e4e6d7-f1c4-4539-a1c7-9d5fd4aed1eb",
      "name": "季度触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -304,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 0 1 */3 *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "acc3caae-a2f2-47ee-90fe-d9d6cc908cde",
      "name": "查找旧文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -48,
        96
      ],
      "parameters": {
        "options": {
          "order": "asc",
          "before": "{{ $now.minus({ months: 12 }).toISO() }}",
          "status": "publish"
        },
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "4d37e32a-8a0c-4881-9898-871252d5ac45",
      "name": "检查是否找到文章",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6516d0df-79fc-4895-b422-1aaf6e348fc8",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9d23ec40-bb26-4aa4-b960-fde58c5247f6",
      "name": "归档文章",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        464,
        32
      ],
      "parameters": {
        "postId": "={{ $json.id }}",
        "operation": "update",
        "updateFields": {
          "tags": "archived,old-content",
          "status": "draft"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4d4a6928-521e-4cda-b7ee-66641e34838f",
      "name": "发送通知",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        720,
        32
      ],
      "webhookId": "3bddfc19-dba1-4010-8c05-a4ff5f7f5f67",
      "parameters": {
        "options": {},
        "subject": "Quarterly Archive Complete"
      },
      "credentials": {
        "smtp": {
          "id": "0xVva6dyyi5SuxBe",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6b526fe7-645a-4cb5-bb5b-4e0c31d84142",
      "name": "记录无文章",
      "type": "n8n-nodes-base.noOp",
      "position": [
        448,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e9a2e951-43e5-4e98-83d4-3145dc6dbf47",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -80
      ],
      "parameters": {
        "width": 380,
        "height": 780,
        "content": "## 工作流概览"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Archive Post": {
      "main": [
        [
          {
            "node": "Send Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Old Posts": {
      "main": [
        [
          {
            "node": "Check if Posts Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quarterly Trigger": {
      "main": [
        [
          {
            "node": "Find Old Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Posts Found": {
      "main": [
        [
          {
            "node": "Archive Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log No Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 文件管理, 多模态 AI

需要付费吗?

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

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

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

作者
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

外部链接
在 n8n.io 查看

分享此工作流