8
n8n 中文网amn8n.com

GA4异常检测与自动Slack和邮件提醒

中级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 If, Set, Code, Gmail, Slack 等节点。 GA4异常检测与自动Slack和邮件提醒

前置要求
  • Google 账号和 Gmail API 凭证
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "2718e70d3927cc6f222cd0fca1f41929053688eb8b4504451ee7746fdfef7be1"
  },
  "nodes": [
    {
      "id": "c78448ee-b1f9-4455-b9e9-94ca9bcdf8e5",
      "name": "检测 GA4 异常",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -80
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "34b855f2-0d92-4600-baa8-7f3181a91c0b",
      "name": "定义变量",
      "type": "n8n-nodes-base.set",
      "position": [
        -32,
        -80
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "1525c5d3-18c6-4a93-9756-99fc8ebf63ca",
      "name": "获取 GA4 数据",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        -80
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a2b38011-ab3f-4ea6-ac18-68f311a452b5",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -528
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5c73dc42-5021-4d51-8737-0632fc953b33",
      "name": "发送消息",
      "type": "n8n-nodes-base.slack",
      "position": [
        960,
        16
      ],
      "webhookId": "8656825d-f8e1-40d0-a4b7-ec1585de4db3",
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "5e6e7560-3027-401e-af65-d1f9798c771a",
      "name": "发送邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        960,
        -224
      ],
      "webhookId": "ed3b920e-753e-45b4-a783-d548fb8f3492",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "bbf1cf7d-4179-4896-b787-1301c358a0dd",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -224,
        -80
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "6df9c8bc-e52f-4d3e-93c3-4ab199b5f85b",
      "name": "如果发现异常",
      "type": "n8n-nodes-base.if",
      "position": [
        608,
        -80
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "0559d7c3-cec0-447c-ab48-43804e067f3e",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -528
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Get GA4 Data": {
      "main": [
        [
          {
            "node": "Detect GA4 Anomalies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define variables": {
      "main": [
        [
          {
            "node": "Get GA4 Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Define variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If anomaly is found": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send an email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect GA4 Anomalies": {
      "main": [
        [
          {
            "node": "If anomaly is found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, 多模态 AI

需要付费吗?

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

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

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

作者

Software Engineer & Automations Specialist

外部链接
在 n8n.io 查看

分享此工作流