# N8N自动化工作流案例-RSS博客+本地视频自动上传云端

By [noise](https://paragraph.com/@noise-4) · 2023-08-01

---

一、RSS发送mataroa博客
----------------

在这个示例中，我使用定时器来作为工作流的开始，并按定时周期自动执行，首先是采集RSS信息【可以是自己的发布渠道，也可以是别人的】再将这些数据进行筛选合并，如果你想要输入1和2所有的信息选合并即可。

deepl是用来翻译外文rss源的，需要设置认证信息，如果不需要则可以删除

配置mataroa博客我在上篇文章已经讲过，可以根据官方或我的示例进行配置

传入谷歌电子表格是为了记录更新信息，最后的步骤是tg和http发送通知，如何配置可查看官方或我上篇提到的示例

脚本：可以一键复制粘贴到n8n

    {
      "name": "自动化博客",
      "nodes": [
        {
          "parameters": {},
          "id": "a497b002-7c0b-47c5-9ce9-5aee11b9c195",
          "name": "RSS Read",
          "type": "n8n-nodes-base.rssFeedRead",
          "typeVersion": 1,
          "position": [
            820,
            720
          ]
        },
        {
          "parameters": {},
          "id": "fd6a1f07-76a2-42f2-bc6c-e55ab7887ac8",
          "name": "RSS Read1",
          "type": "n8n-nodes-base.rssFeedRead",
          "typeVersion": 1,
          "position": [
            820,
            560
          ]
        },
        {
          "parameters": {},
          "id": "e8684658-b810-446d-95ea-15e1757ba4de",
          "name": "RSS Read3",
          "type": "n8n-nodes-base.rssFeedRead",
          "typeVersion": 1,
          "position": [
            820,
            260
          ]
        },
        {
          "parameters": {},
          "id": "f80c9c5d-f5a9-4328-a4f3-613ce626b544",
          "name": "筛选或合并",
          "type": "n8n-nodes-base.merge",
          "typeVersion": 2.1,
          "position": [
            1060,
            460
          ]
        },
        {
          "parameters": {
            "operation": "toFile",
            "options": {}
          },
          "id": "4f7a1000-7ab6-4ccd-8400-f300dbb6673c",
          "name": "Spreadsheet File",
          "type": "n8n-nodes-base.spreadsheetFile",
          "typeVersion": 1,
          "position": [
            1240,
            700
          ]
        },
        {
          "parameters": {},
          "id": "e29b011b-5718-4ab2-b579-7a6f233f1f47",
          "name": "RSS信息",
          "type": "n8n-nodes-base.rssFeedRead",
          "typeVersion": 1,
          "position": [
            820,
            400
          ]
        },
        {
          "parameters": {
            "method": "POST",
            "url": "https://mataroa.blog/api/posts/",
            "authentication": "genericCredentialType",
            "genericAuthType": "httpHeaderAuth",
            "sendHeaders": true,
            "headerParameters": {
              "parameters": [
                {
                  "name": "Authorization",
                  "value": "按官方添加token"
                }
              ]
            },
            "sendBody": true,
            "bodyParameters": {
              "parameters": [
                {
                  "name": "title",
                  "value": "={{ $json.title }}"
                },
                {
                  "name": "body",
                  "value": "={{ $json['content:encoded'] }}"
                },
                {
                  "name": "date",
                  "value": "={{ $json.isoDate }}"
                }
              ]
            },
            "options": {}
          },
          "id": "243538fd-7042-45cd-ae3d-1533c4ce988b",
          "name": "发送mataroa博客",
          "type": "n8n-nodes-base.httpRequest",
          "typeVersion": 4.1,
          "position": [
            1240,
            500
          ],
          "credentials": {
            "httpBasicAuth": {
              "id": "EMNd7V1818achbV1",
              "name": "Unnamed credential"
            },
            "httpHeaderAuth": {
              "id": "4KwXXHCoEZ06w9Mr",
              "name": "Header Auth account"
            }
          }
        },
        {
          "parameters": {
            "options": {}
          },
          "id": "4d0927e1-3c97-4b37-8a3d-4d3e1abadaec",
          "name": "Google云盘",
          "type": "n8n-nodes-base.googleDrive",
          "typeVersion": 2,
          "position": [
            1400,
            700
          ]
        },
        {
          "parameters": {
            "operation": "sendChatAction"
          },
          "id": "d3fb8e18-ea1f-495f-b8aa-3e260619b95c",
          "name": "Telegram频道",
          "type": "n8n-nodes-base.telegram",
          "typeVersion": 1,
          "position": [
            1540,
            480
          ]
        },
        {
          "parameters": {
            "operation": "sendChatAction"
          },
          "id": "98d71b13-a5b1-4df2-aa67-fc61488ab43d",
          "name": "Telegram频道1",
          "type": "n8n-nodes-base.telegram",
          "typeVersion": 1,
          "position": [
            1560,
            700
          ]
        },
        {
          "parameters": {
            "rule": {
              "interval": [
                {
                  "field": "hours"
                }
              ]
            }
          },
          "id": "30c0f24f-aca0-47ec-9a10-d66c7308d24b",
          "name": "定时运行器",
          "type": "n8n-nodes-base.scheduleTrigger",
          "typeVersion": 1.1,
          "position": [
            620,
            440
          ]
        },
        {
          "parameters": {
            "options": {}
          },
          "id": "ca61e156-c0ee-4e07-9c04-11e1ec3df026",
          "name": "企业微信配置inotify或其它通知件",
          "type": "n8n-nodes-base.httpRequest",
          "typeVersion": 4.1,
          "position": [
            1520,
            280
          ]
        },
        {
          "parameters": {
            "additionalFields": {}
          },
          "id": "1b3b4b31-25b5-4737-a2bd-96c9a8e69179",
          "name": "DeepL翻译",
          "type": "n8n-nodes-base.deepL",
          "typeVersion": 1,
          "position": [
            1240,
            240
          ],
          "disabled": true
        }
      ],
      "pinData": {},
      "connections": {
        "RSS Read": {
          "main": [
            [
              {
                "node": "筛选或合并",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "RSS Read1": {
          "main": [
            [
              {
                "node": "筛选或合并",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "RSS Read3": {
          "main": [
            [
              {
                "node": "筛选或合并",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "筛选或合并": {
          "main": [
            [
              {
                "node": "发送mataroa博客",
                "type": "main",
                "index": 0
              },
              {
                "node": "Spreadsheet File",
                "type": "main",
                "index": 0
              },
              {
                "node": "企业微信配置inotify或其它通知件",
                "type": "main",
                "index": 0
              },
              {
                "node": "DeepL翻译",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Spreadsheet File": {
          "main": [
            [
              {
                "node": "Google云盘",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "RSS信息": {
          "main": [
            [
              {
                "node": "筛选或合并",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "发送mataroa博客": {
          "main": [
            [
              {
                "node": "Telegram频道",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Google云盘": {
          "main": [
            [
              {
                "node": "Telegram频道1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "定时运行器": {
          "main": [
            [
              {
                "node": "RSS Read",
                "type": "main",
                "index": 0
              },
              {
                "node": "RSS Read1",
                "type": "main",
                "index": 0
              },
              {
                "node": "RSS信息",
                "type": "main",
                "index": 0
              },
              {
                "node": "RSS Read3",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "DeepL翻译": {
          "main": [
            []
          ]
        }
      },
      "active": false,
      "settings": {},
      "versionId": "91348b9b-34d5-44e9-b173-e49edd9ab1d2",
      "id": "jSfmzrv9xVSHrwvN",
      "meta": {
        "instanceId": "cbaa89b05f7e8025300393a3b50bd22c3458c622bdb06477dd42614411c85114"
      },
      "tags": []
    }
    

二、监控本地视频完成自动上传
--------------

这个配置也非常简单，不过它适用于下载N8N客户端到本地后执行

由监控本地文件夹内文件更新或更改而触发，间隔件则是为避免有错误的文件传入

上传分为one drive、google云盘及如果你有需要上传到youtube的流程，最后流出时间给通知

脚本：可一键复制到n8n

    {
      "name": "My workflow",
      "nodes": [
        {
          "parameters": {
            "triggerOn": "folder",
            "events": [
              "add"
            ],
            "options": {}
          },
          "id": "a36ec382-9405-4e5c-b514-b22bdf88e0c8",
          "name": "Local File Trigger",
          "type": "n8n-nodes-base.localFileTrigger",
          "typeVersion": 1,
          "position": [
            340,
            320
          ]
        },
        {
          "parameters": {
            "options": {}
          },
          "id": "b35b730a-0974-4ddb-878e-1da1185153d5",
          "name": "Google Drive",
          "type": "n8n-nodes-base.googleDrive",
          "typeVersion": 2,
          "position": [
            800,
            520
          ]
        },
        {
          "parameters": {
            "resource": "video",
            "operation": "upload",
            "options": {}
          },
          "id": "b625676d-ca31-434a-9ba8-d692abaecb48",
          "name": "YouTube",
          "type": "n8n-nodes-base.youTube",
          "typeVersion": 1,
          "position": [
            800,
            360
          ]
        },
        {
          "parameters": {},
          "id": "05f3aa45-3671-4c96-aa21-7af64f924b45",
          "name": "Microsoft OneDrive",
          "type": "n8n-nodes-base.microsoftOneDrive",
          "typeVersion": 1,
          "position": [
            800,
            160
          ]
        },
        {
          "parameters": {
            "options": {}
          },
          "id": "2b99aba4-d855-4b6f-867b-c49a8a4f3e52",
          "name": "通知",
          "type": "n8n-nodes-base.httpRequest",
          "typeVersion": 4.1,
          "position": [
            1100,
            320
          ]
        },
        {
          "parameters": {},
          "id": "d0378c49-e1f7-4973-8f2e-0b49518724b3",
          "name": "间隔时间",
          "type": "n8n-nodes-base.wait",
          "typeVersion": 1,
          "position": [
            560,
            320
          ],
          "webhookId": "34bc8897-f789-4796-a932-2b5bd0d3ec9a"
        }
      ],
      "pinData": {},
      "connections": {
        "Local File Trigger": {
          "main": [
            [
              {
                "node": "间隔时间",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Google Drive": {
          "main": [
            [
              {
                "node": "通知",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Microsoft OneDrive": {
          "main": [
            [
              {
                "node": "通知",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "YouTube": {
          "main": [
            [
              {
                "node": "通知",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "间隔时间": {
          "main": [
            [
              {
                "node": "Google Drive",
                "type": "main",
                "index": 0
              },
              {
                "node": "YouTube",
                "type": "main",
                "index": 0
              },
              {
                "node": "Microsoft OneDrive",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      },
      "active": false,
      "settings": {},
      "versionId": "",
      "meta": {
        "instanceId": "cbaa89b05f7e8025300393a3b50bd22c3458c622bdb06477dd42614411c85114"
      },
      "tags": []
    }

---

*Originally published on [noise](https://paragraph.com/@noise-4/n8n-rss)*
