8
n8n 中文网amn8n.com

将筛选的Gmail通知转发到Telegram聊天

初级

这是一个Support, IT Ops领域的自动化工作流,包含 5 个节点。主要使用 If, Telegram, GmailTrigger 等节点。 将筛选的Gmail通知转发到Telegram聊天

前置要求
  • Telegram Bot Token
  • Google 账号和 Gmail API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "AvXlqUiuc1qJSwxf",
  "meta": {
    "instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa"
  },
  "name": "将筛选的Gmail通知转发到Telegram聊天",
  "tags": [],
  "nodes": [
    {
      "id": "99441348-1d5d-459f-961f-48bd593144f2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 1000,
        "height": 300,
        "content": "# 将筛选的Gmail通知转发到Telegram聊天"
      },
      "typeVersion": 1
    },
    {
      "id": "eadf565c-e753-4682-a8c2-6bc630a30a27",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        320
      ],
      "parameters": {
        "color": 4,
        "width": 1000,
        "height": 200,
        "content": "## 描述:"
      },
      "typeVersion": 1
    },
    {
      "id": "bb2a78d7-91ba-4e8c-a9f1-af270a50bd8f",
      "name": "传入邮件监控器",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        20,
        100
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "5V09QSJCeHoQoKUp",
          "name": "SM MaryP (Gmail)"
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.2
    },
    {
      "id": "addffc7b-ef58-4fb5-9275-3db6fd84f4c0",
      "name": "邮件验证检查",
      "type": "n8n-nodes-base.if",
      "position": [
        340,
        100
      ],
      "parameters": {
        "options": {
          "ignoreCase": false
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "2496d01f-dbd5-4e23-84c3-f78decb87697",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.Subject }}",
              "rightValue": "Urgent"
            },
            {
              "id": "274e9e05-5c74-487e-851d-0ca62210cb99",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.Subject }}",
              "rightValue": "Server Down"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "e87d46b6-efc6-466f-a708-bfbf34bf001b",
      "name": "发送Telegram消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        700,
        80
      ],
      "webhookId": "c8f1d16f-b698-4af9-a795-9aaa277c2bf6",
      "parameters": {
        "text": "=From : {{ $json.From }}\nSubject :{{ $json.Subject }}\nMessage : {{ $json.snippet }}\n",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "notesInFlow": false,
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "caf5eedb-4c6b-4bfa-9a0a-2d868291a83c",
  "connections": {
    "Email Validation Check": {
      "main": [
        [
          {
            "node": "Send Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Incoming Email Monitor": {
      "main": [
        [
          {
            "node": "Email Validation Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

初级 - 客户支持, IT 运维

需要付费吗?

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

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

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
WeblineIndia

WeblineIndia

@weblineindia

A Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.

外部链接
在 n8n.io 查看

分享此工作流