8
n8n 中文网amn8n.com

从Google Sheets创建Discord频道并通知成员

中级

这是一个AI, Marketing领域的自动化工作流,包含 14 个节点。主要使用 Filter, Discord, GoogleSheets, GoogleSheetsTrigger 等节点,结合人工智能技术实现智能自动化。 从Google Sheets创建Discord频道并通知成员

前置要求
  • Discord Bot Token 或 Webhook
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "onboarding-workflow-template",
  "meta": {
    "instanceId": "template-instance-id",
    "templateCredsSetupCompleted": false
  },
  "name": "从 Google Sheets 创建 Discord 频道并通知成员",
  "tags": [],
  "nodes": [
    {
      "id": "c9ed5dd5-e2b9-4e6b-b0b5-3af3729428a7",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -60
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 监控新项目条目"
      },
      "typeVersion": 1
    },
    {
      "id": "f8509721-482a-4088-93a8-59c3abd86af9",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -60
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 筛选有效项目条目"
      },
      "typeVersion": 1
    },
    {
      "id": "5c51ca61-5591-4512-8b26-5988d0ce9dc9",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -60
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 创建新 Discord 频道"
      },
      "typeVersion": 1
    },
    {
      "id": "b5a5eb5a-e4fa-4ed3-b590-972eb9c0080f",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -60
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 使用频道信息更新 Google Sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "08e09442-ee10-4421-9ff8-9ed234c8dad3",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -60
      ],
      "parameters": {
        "width": 580,
        "height": 360,
        "content": "## 发送项目公告"
      },
      "typeVersion": 1
    },
    {
      "id": "f418dff7-e57c-40b7-a4a3-8b6357936b85",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        -60
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 完成入职流程"
      },
      "typeVersion": 1
    },
    {
      "id": "9042f971-3a6e-4125-ba4c-326793446a9e",
      "name": "监控新项目条目",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -620,
        120
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyX"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "PROJECT_SHEET_ID",
          "cachedResultName": "Project Onboarding"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_GOOGLE_SHEET_URL_HERE"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c0f8af86-cd7c-42d5-b8c3-d20a75e4a9cf",
      "name": "筛选有效项目条目",
      "type": "n8n-nodes-base.filter",
      "position": [
        -320,
        120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a5d0b0c6-424b-441d-bcf7-7a5ac25698b2",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json['Discord ID'] }}",
              "rightValue": "Created"
            },
            {
              "id": "f3cef95a-0856-4eff-a2ad-c42a64bae076",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.Timestamp }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "97ddddfb-8bc8-43e9-b06a-4c95a423c7f6",
      "name": "创建 Discord 频道",
      "type": "n8n-nodes-base.discord",
      "position": [
        -20,
        120
      ],
      "webhookId": "YOUR_DISCORD_WEBHOOK_ID",
      "parameters": {
        "name": "={{ $json['Project ID'] }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_DISCORD_GUILD_ID",
          "cachedResultName": "Your Discord Server"
        },
        "options": {
          "categoryId": {
            "__rl": true,
            "mode": "list",
            "value": "YOUR_DISCORD_CATEGORY_ID",
            "cachedResultName": "New Projects Category"
          }
        }
      },
      "credentials": {
        "discordBotApi": {
          "id": "YOUR_DISCORD_BOT_CREDENTIAL_ID",
          "name": "Discord Bot API"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "005657e7-eef2-45e0-aceb-694bee90757f",
      "name": "使用 Discord 频道 ID 更新表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        280,
        120
      ],
      "parameters": {
        "columns": {
          "value": {
            "Domain ID": "={{ $('Filter Valid Project Entries').item.json['Domain ID'] }}",
            "Discord ID": "={{ $json.id }}",
            "Discord Server Creation": "Discord Created"
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Domain ID"
          ]
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "PROJECT_SHEET_ID",
          "cachedResultName": "Project Onboarding"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_GOOGLE_SHEET_URL_HERE"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "2a5bfd36-9fe4-4832-8a6c-6063bd620483",
      "name": "检查消息发送状态",
      "type": "n8n-nodes-base.filter",
      "position": [
        560,
        120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "36a3a601-2204-4080-a869-ee00506a7fec",
              "operator": {
                "type": "dateTime",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $('Monitor New Project Entries').item.json.Timestamp }}",
              "rightValue": ""
            },
            {
              "id": "7675f210-3bc8-41b9-9dee-53b13926eaa1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json['Discord Server Creation'] }}",
              "rightValue": "Discord Created"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a7499f15-0c8d-4505-92c0-0967432700ee",
      "name": "发送项目公告消息",
      "type": "n8n-nodes-base.discord",
      "position": [
        900,
        120
      ],
      "webhookId": "YOUR_DISCORD_WEBHOOK_ID",
      "parameters": {
        "content": "=Congratulations Team! We Got A New Project 🤩 🥳 @everyone\n\n@ProjectManager Please assign this project to the respective team\n\n**Project ID:** {{ $('Filter Valid Project Entries').item.json['Project ID'] }}\n**Project Type:** {{ $('Filter Valid Project Entries').item.json['Product Type'] }}\n**Client Name:** {{ $('Filter Valid Project Entries').item.json['Client Name'] }}\n\n**What is the main goal of this client? What he/she is trying to achieve with this project?**\n{{ $('Filter Valid Project Entries').item.json['What is the main goal of this client? What he/she is trying to achieve with this project?'] }}\n\n**Is there any task that we need to do immediately on this project?**\n{{ $('Filter Valid Project Entries').item.json['Is there any task that we need to do immediately on this project?'] }}\n\n**Our commitments to the client that operation team should know?**\n{{ $('Filter Valid Project Entries').item.json['Our commitments to the client that operation team should know?'] }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_DISCORD_GUILD_ID",
          "cachedResultName": "Your Discord Server"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Update Sheet with Discord Channel ID').item.json['Discord ID'] }}"
        }
      },
      "credentials": {
        "discordBotApi": {
          "id": "YOUR_DISCORD_BOT_CREDENTIAL_ID",
          "name": "Discord Bot API"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3c43a71e-fa48-407a-8cd6-b4fd866d1657",
      "name": "发送额外项目详情",
      "type": "n8n-nodes-base.discord",
      "position": [
        1140,
        120
      ],
      "webhookId": "YOUR_DISCORD_WEBHOOK_ID",
      "parameters": {
        "content": "=**Additional Project Information:**\n\n**Anything else you want to share about this project?**\n{{ $('Filter Valid Project Entries').item.json['Anything else you want to share about this project?'] }}\n\n**Access Information:**\n**Google Analytics:** {{ $('Filter Valid Project Entries').item.json['Access [Google Analytics]'] }}\n**Google Search Console:** {{ $('Filter Valid Project Entries').item.json['Access [Google Search Console]'] }}\n**Website Backend:** {{ $('Filter Valid Project Entries').item.json['Access [Website Backend]'] }}\n\n**Competitors & Keywords:**\n{{ $('Filter Valid Project Entries').item.json['List of top competitors & seed keywords? (whatever is available)'] }}\n\n**Call Recording:** {{ $('Filter Valid Project Entries').item.json['Call Recording URL'] }}\n\n**Communication Method:** {{ $('Filter Valid Project Entries').item.json['Communication Method (if any)'] }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_DISCORD_GUILD_ID",
          "cachedResultName": "Your Discord Server"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.channel_id }}"
        }
      },
      "credentials": {
        "discordBotApi": {
          "id": "YOUR_DISCORD_BOT_CREDENTIAL_ID",
          "name": "Discord Bot API"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4a7b142a-9fc4-4eb8-baf2-1745a3597e69",
      "name": "标记入职完成",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1480,
        120
      ],
      "parameters": {
        "columns": {
          "value": {
            "Discord ID": "={{ $('Check Message Sending Status').item.json['Discord ID'] }}",
            "Discord Server Creation": "Discord Created, Onboarding Message Sent"
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Discord ID"
          ]
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "PROJECT_SHEET_ID",
          "cachedResultName": "Project Onboarding"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_GOOGLE_SHEET_URL_HERE"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "template-version-id",
  "connections": {
    "Create Discord Channel": {
      "main": [
        [
          {
            "node": "Update Sheet with Discord Channel ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitor New Project Entries": {
      "main": [
        [
          {
            "node": "Filter Valid Project Entries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Message Sending Status": {
      "main": [
        [
          {
            "node": "Send Project Announcement Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Project Entries": {
      "main": [
        [
          {
            "node": "Create Discord Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Additional Project Details": {
      "main": [
        [
          {
            "node": "Mark Onboarding Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Project Announcement Message": {
      "main": [
        [
          {
            "node": "Send Additional Project Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet with Discord Channel ID": {
      "main": [
        [
          {
            "node": "Check Message Sending Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人工智能, 营销

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流