{
  "name": "Gmail \u2192 Telegram Forwarder",
  "nodes": [
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 3
          },
          "conditions": [
            {
              "id": "8aea1f21-3a80-4877-906e-0e679e99b8da",
              "leftValue": "={{ $json.snippet }}",
              "rightValue": "YOUR_FILTER_KEYWORD_1",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            },
            {
              "id": "edcf1434-861e-453c-bf60-aba84a2f7e87",
              "leftValue": "={{ $json.snippet }}",
              "rightValue": "YOUR_FILTER_KEYWORD_2",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "9b6faa34-26f1-4a46-ba64-397600752e8c",
              "leftValue": "={{ $json.snippet }}",
              "rightValue": "YOUR_FILTER_KEYWORD_3",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {
          "ignoreCase": true
        }
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.3,
      "position": [
        432,
        0
      ],
      "id": "6d8a27e1-c99b-4a7d-80d6-fae9dccfa993",
      "name": "If"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "ead04264-a821-485e-8d44-8f0447282b6a",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 10,
        "filters": {
          "readStatus": "unread"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "67d1f05f-e018-4264-b752-5d6a1e058415",
      "name": "Get many messages",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "text": "=\ud83d\udce7 {{$json.Subject}}  \n\nFrom: {{$json.From}}  \n\n{{$json.snippet}}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        688,
        -112
      ],
      "id": "9312c588-c2d6-4f7a-b65d-c971d0c3d18e",
      "name": "Send a text message",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        688,
        112
      ],
      "id": "e382a172-0cff-409e-aa2e-c5cfd0961a0b",
      "name": "No Operation, do nothing",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "content": "Edit the IF block/node to set filter the mails on which you want automation. For example, search keyword in mail snippets, find specific keyword in subjects, filter mails from specific sender, etc. ",
        "width": 304
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        176
      ],
      "typeVersion": 1,
      "id": "dfd56cf4-b053-4e11-8ff2-ad01fe358aeb",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "Create new bot through botfather using /newbot. set a name and get api token code. \n\nset username in node and get chatid using: \n\nhttps://api.telegram.org/bot<YourBOTToken>/getUpdates \n\nReplace bottoken with your code. and get chatid (chatid not same as username)",
        "height": 304,
        "width": 288
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -208
      ],
      "typeVersion": 1,
      "id": "7f9c4106-4677-406f-b0c8-8e0bedf1360b",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "Setup gmails and its setting based on your workflow goals.",
        "height": 96,
        "width": 224
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -128
      ],
      "typeVersion": 1,
      "id": "ff3c5fd2-c0ca-4009-97f8-cff0e0035bdb",
      "name": "Sticky Note2"
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get many messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many messages": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false,
    "timeSavedMode": "fixed",
    "timezone": "UTC",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "staticData": null,
  "triggerCount": 0,
  "meta": {
    "templateCredsSetupCompleted": true
  }
}