8
n8n 中文网amn8n.com

我的工作流3

中级

这是一个Social Media, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 If, Set, Limit, GoogleDrive, GoogleSheets 等节点。 使用Blotato从Google Sheets和Drive自动化TikTok视频发布

前置要求
  • Google Drive API 凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "fGSgxvT4oxPB2QtC",
  "meta": {
    "instanceId": "aa8f1cf0c4d8087e25a2eea962da249799481d2fb992314793977a97a5e71d77",
    "templateCredsSetupCompleted": true
  },
  "name": "我的工作流 3",
  "tags": [],
  "nodes": [
    {
      "id": "803334ae-8858-402a-a572-d8a0bbc53c75",
      "name": "获取Google Drive ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1750d20-2f6e-4826-80b8-654d0985120d",
              "name": "final_google_drive_url",
              "type": "string",
              "value": "={{ $json['Media URL'].match(/https:\\/\\/drive\\.google\\.com\\/file\\/d\\/([A-Za-z0-9_-]+)/i)[1]  }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2a36e1fd-0949-44c6-984e-c545cf0454d8",
      "name": "URL视频转帖子",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -304,
        192
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0/edit?usp=drivesdk",
          "cachedResultName": "Handsome warden TikTok"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "bAnK8T185A3Wr7Kj",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b58b9863-09df-4cce-a6c9-ab94c971b408",
      "name": "上传视频到 BLOTATO",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -432,
        608
      ],
      "parameters": {
        "mediaUrl": "=https://drive.google.com/uc?export=download&id={{ $('Get Google Drive ID').item.json.final_google_drive_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "6sPTZyXKAaTQFB4O",
          "name": "Blotato API Account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fda25ce7-dcba-413e-bc46-894a09924bf0",
      "name": "TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -272,
        608
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "13117",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/13117",
          "cachedResultName": "handsomewarden"
        },
        "postContentText": "={{ $('URL VIDEO to Post').item.json.Caption }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "6sPTZyXKAaTQFB4O",
          "name": "Blotato API Account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ef03626b-2726-424b-9324-7dc308a14c1a",
      "name": "更新状态为 \"完成\"",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -112,
        608
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $('URL VIDEO to Post').item.json.ID }}",
            "Status": "posted"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Media URL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Media URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Caption",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TgAOn_dRUwEQFlWtNXFxXj72SVqPuMIMZ85dwsjcuG0/edit?usp=drivesdk",
          "cachedResultName": "Handsome warden TikTok"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "bAnK8T185A3Wr7Kj",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "48004fda-d785-4891-a99b-42e1bfc75f20",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        -144,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bc74b0c2-aa46-4bcd-91f3-1eb6b0720167",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.Status }}",
              "rightValue": "pending"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8abafc8d-b429-485b-840f-a4a4cc25cf28",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        -432,
        400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f0905405-fb5d-4a4b-b67e-76a2a6980962",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -464,
        192
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "executeOnce": false,
      "retryOnFail": false,
      "typeVersion": 1.2,
      "alwaysOutputData": false
    },
    {
      "id": "d48267e8-d01e-4035-99ed-4f646afe8784",
      "name": "共享文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -160,
        400
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.final_google_drive_url }}"
        },
        "options": {},
        "operation": "share",
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "1Bnhm02w1dxE4FO6",
          "name": "Farooq Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "362862ae-f47f-465a-a771-ae8c408cae94",
      "name": "📋 数据检索与筛选",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        160
      ],
      "parameters": {
        "width": 464,
        "height": 736,
        "content": "**数据检索与筛选部分**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d94c0d1f-9d93-4e80-a59a-514f08033055",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Get Google Drive ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tiktok": {
      "main": [
        [
          {
            "node": "Update Status to \"DONE\"",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file": {
      "main": [
        [
          {
            "node": "Upload Video to BLOTATO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "URL VIDEO to Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "URL VIDEO to Post": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google Drive ID": {
      "main": [
        [
          {
            "node": "Share file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to BLOTATO": {
      "main": [
        [
          {
            "node": "Tiktok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 社交媒体, 多模态 AI

需要付费吗?

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

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

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

作者
外部链接
在 n8n.io 查看

分享此工作流