8
n8n 中文网amn8n.com

使用n8n API和Google Sheets创建工作流清单仪表板

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 12 个节点。主要使用 N8n, Code, Wait, GoogleSheets, ManualTrigger 等节点。 使用n8n API和Google Sheets创建工作流清单仪表板

前置要求
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "id": "77258fdc-d5a6-436a-9f62-a27198c6f260",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -416,
        400
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4fd61bbf-3610-40f2-9382-3f7db4781d5a",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -416,
        576
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "598ff657-359e-47c3-b129-47bde05253f9",
      "name": "获取所有工作流程",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -128,
        400
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "f0tZ3cYZCDue1DXO",
          "name": "n8n account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "46e7b134-ecbf-4700-aa78-a1df918fbd78",
      "name": "遍历每个工作流程",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        96,
        400
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": false,
      "typeVersion": 3
    },
    {
      "id": "d9d2e331-2711-42a4-8c01-e76a27adfdf5",
      "name": "提取工作流程详情",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        496
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet info = {\n  name: $input.first().json.name,\n  id: $input.first().json.id,\n  tags: $input.first().json.tags.map(ar => ar.name).join(\"\\n\")\n}\n  \nlet nodeTypes = {}\nfor (const node of $input.first().json.nodes) {\n  nodeTypes[node.type] = 1\n}\nlet nodes = Object.keys(nodeTypes).join(\"\\n\");\nreturn {nodes, info }"
      },
      "typeVersion": 2
    },
    {
      "id": "0b00faee-6d4f-45a1-a80b-a7dfba598410",
      "name": "在Google Sheets中添加/更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        496
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.info.id }}",
            "link": "=https://n8n.pollup.net/workflow/{{ $json.info.id }}",
            "tags": "={{ $json.info.tags }}",
            "nodes": "={{ $json.nodes }}",
            "title": "={{ $json.info.name }}",
            "Active": "={{ $('Loop Through Each Workflow').item.json.active }}",
            "Archived": "={{ $('Loop Through Each Workflow').item.json.isArchived }}",
            "CreatedAt": "={{ $('Loop Through Each Workflow').item.json.createdAt }}",
            "UpdatedAt": "={{ $('Loop Through Each Workflow').item.json.updatedAt }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "link",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "nodes",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "nodes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Active",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Active",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Archived",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Archived",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE/edit?usp=drivesdk",
          "cachedResultName": "Techical list of n8n workflows"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "CDeeefswtgrq3bZN",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0bbf1258-df8b-47cf-abad-b8552bceca64",
      "name": "暂停以避免速率限制",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        496
      ],
      "webhookId": "363ab442-fd74-4708-a128-425a7897330e",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "16fe9a20-47d1-4d7a-a258-f5417ba094b2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -96
      ],
      "parameters": {
        "width": 704,
        "height": 208,
        "content": "## Google Sheets中的工作流程清单"
      },
      "typeVersion": 1
    },
    {
      "id": "c2d22c7d-87ee-4d30-90e7-c27b1546d034",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 528,
        "content": "## 触发器选择"
      },
      "typeVersion": 1
    },
    {
      "id": "74f65a95-8664-4c54-9773-c832aa440cbb",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 192,
        "content": "## Google Sheets配置"
      },
      "typeVersion": 1
    },
    {
      "id": "2564a727-da3c-4f08-933f-0bb6d99a3f4b",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        160
      ],
      "parameters": {
        "color": 7,
        "height": 480,
        "content": "## 自定义提示"
      },
      "typeVersion": 1
    },
    {
      "id": "a8f58c9f-88d3-466e-ad24-7a74438dcd9c",
      "name": "便签 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        752
      ],
      "parameters": {
        "width": 460,
        "height": 196,
        "content": "## 联系我"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Workflows": {
      "main": [
        [
          {
            "node": "Loop Through Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Workflow Details": {
      "main": [
        [
          {
            "node": "Add/Update Row in Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Each Workflow": {
      "main": [
        [],
        [
          {
            "node": "Extract Workflow Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pause to Avoid Rate Limits": {
      "main": [
        [
          {
            "node": "Loop Through Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add/Update Row in Google Sheet": {
      "main": [
        [
          {
            "node": "Pause to Avoid Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get All Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
PollupAI

PollupAI

@zeerobug

We create bespoke AI solutions, automations and agents that help your business as it scales.

外部链接
在 n8n.io 查看

分享此工作流