{
  "name": "Generate 5-level AI explanations for different audiences from Telegram to Google Docs with GPT-4.1-mini",
  "nodes": [
    {
      "id": "8b93ecad-b3ef-4924-94e0-d2b99f9cfd91",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1424,
        736
      ]
    },
    {
      "id": "30be649e-efdb-4896-8366-98ee858eb3cd",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1488,
        1072
      ]
    },
    {
      "id": "1e6eb2c0-e20a-483c-a0b8-2a77e828ac35",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        560
      ],
      "parameters": {
        "width": 576,
        "height": 448,
        "content": "## Input Layer\n\n**1. Telegram receives your question**\n**2. Extracts your chat ID and question**\n**3. Creates 5 copies (one per level)**\n\n\n\n\n\n"
      }
    },
    {
      "id": "35270e52-112b-4917-8fc1-37b95a7b4881",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        272
      ],
      "parameters": {
        "width": 640,
        "height": 208,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "da79c52a-29f3-4f60-b2f2-502b848aeb63",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        496
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "8bfcc178-4926-42fb-abfa-5fef7a85442e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        416
      ],
      "parameters": {
        "width": 480,
        "height": 416,
        "content": "## Telegram Output\n\n**Sends you 6 messages:**\n\n**1. Header (your question + date)**\n**2-6. Five explanations**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "fdb1b23a-266c-46af-a93a-6173e133f09e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        912
      ],
      "parameters": {
        "width": 480,
        "height": 416,
        "content": "## Google Doc Output  (for reference)\n\n**Sends you the final output with 5 variations:**\n\n\n"
      }
    },
    {
      "id": "1ff218fb-feb9-4f68-b435-1538b3ec1a1c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        112
      ],
      "parameters": {
        "width": 672,
        "height": 1200,
        "content": "\n\n# 🚀 Try It Out\n\nSend a message to your Telegram bot with any question (e.g., \"What is machine learning?\"). Within seconds, you'll receive 6 messages: a header plus 5 AI-generated explanations tailor"
      }
    },
    {
      "id": "1f4811cd-1459-4b31-b79f-3b664d956a87",
      "name": "Receive User Question",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        816,
        800
      ]
    },
    {
      "id": "81c6f41e-6a59-4710-8fb3-d2b6e71d62f2",
      "name": "Extract Query Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        800
      ]
    },
    {
      "id": "35ba1d00-43cc-49c6-a21e-65257f184e42",
      "name": "Route to Appropriate Level",
      "type": "n8n-nodes-base.code",
      "position": [
        1232,
        800
      ]
    },
    {
      "id": "ce91dbad-36dd-4746-827e-1961b89492cc",
      "name": "5-Year-Old Story Mode",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1696,
        304
      ]
    },
    {
      "id": "4b51c586-9893-48fe-98da-62ec9acbfcc9",
      "name": "Teenager Level",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1696,
        512
      ]
    },
    {
      "id": "c5a6b36c-0bae-4d17-adfc-f11953f62945",
      "name": "Graduate Level",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1696,
        720
      ]
    },
    {
      "id": "e6ad337a-3862-4f4d-b245-5bdf2924c484",
      "name": "PhD Research Level",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1712,
        928
      ]
    },
    {
      "id": "99d9b095-cc42-460c-9be5-5056ce21c999",
      "name": "Business Executive Level",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1728,
        1136
      ]
    },
    {
      "id": "cb4d5199-4769-40fd-a7c7-55a39e7f8c4b",
      "name": "5-Year-Old",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        336
      ]
    },
    {
      "id": "e9684534-4078-4033-b7b6-1acd12a88b70",
      "name": "Teenager",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        544
      ]
    },
    {
      "id": "e2ba26a1-859e-4bbc-9dd6-40afa71b9d9b",
      "name": "Graduate",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        752
      ]
    },
    {
      "id": "a28b4b39-88fb-4b3b-8211-5dd9c8a8b9de",
      "name": "PhD",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        960
      ]
    },
    {
      "id": "ac1ec456-e305-4995-beb0-1ad49a82bd35",
      "name": "Business",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        1168
      ]
    },
    {
      "id": "98fcd21e-8228-4719-9bbc-bc9738d5a74e",
      "name": "Child + Teen",
      "type": "n8n-nodes-base.merge",
      "position": [
        2368,
        528
      ]
    },
    {
      "id": "0a8663b5-2df4-49c8-baee-a43320389ccf",
      "name": "Grad + PhD",
      "type": "n8n-nodes-base.merge",
      "position": [
        2368,
        880
      ]
    },
    {
      "id": "eba46176-6eb4-4a75-9e59-30504e6bf636",
      "name": "First 4 Levels",
      "type": "n8n-nodes-base.merge",
      "position": [
        2624,
        704
      ]
    },
    {
      "id": "b0430533-079a-49f8-9fed-43c193cad0c4",
      "name": "All 5 Levels",
      "type": "n8n-nodes-base.merge",
      "position": [
        2784,
        896
      ]
    },
    {
      "id": "7e1d783b-27b3-4a5f-a62c-01f32f5bcdc0",
      "name": "Aggregate & Structure All Responses",
      "type": "n8n-nodes-base.code",
      "position": [
        3008,
        896
      ]
    },
    {
      "id": "37e5c3c8-442a-4e05-96f8-99c48f0b37e0",
      "name": "Format 6 Messages for Telegram",
      "type": "n8n-nodes-base.code",
      "position": [
        3248,
        656
      ]
    },
    {
      "id": "2350c71f-bebe-46fc-bd94-17273e8687d5",
      "name": "Send to User via Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3472,
        656
      ]
    },
    {
      "id": "9dd4ca28-da2a-4949-a4bf-79a5cc64925d",
      "name": "Format Plain Text for Docs",
      "type": "n8n-nodes-base.code",
      "position": [
        3280,
        1088
      ]
    },
    {
      "id": "848cb28d-000a-4608-96b6-2e3bf759c542",
      "name": "Archive to Google Docs",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        3488,
        1088
      ]
    },
    {
      "id": "9a7c6a52-c6d8-4b6f-a9d4-37cf6fc87fd6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        544
      ],
      "parameters": {
        "width": 208,
        "height": 464,
        "content": "## Routing\n\n**Routes items to AI agents by understanding level.**\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "bfff2891-8123-44d8-8d02-6abf13aafc60",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        496
      ],
      "parameters": {
        "width": 640,
        "height": 192,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "0c3d251b-6ce6-4ca1-971f-78f52c0da336",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        704
      ],
      "parameters": {
        "width": 640,
        "height": 192,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "669325bd-3ba2-4ee4-a705-c3e8606c03d5",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        912
      ],
      "parameters": {
        "width": 640,
        "height": 176,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "63e13142-b299-40f4-a376-30caf8e87c1a",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        1120
      ],
      "parameters": {
        "width": 640,
        "height": 192,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "026ccc65-e7b0-4ade-9659-f03a2084ccd2",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        816
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "74b4fc56-645b-4f84-b93b-91a23b7f48f7",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        640
      ],
      "parameters": {
        "width": 208,
        "height": 240,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "c9e44c4d-244a-4f98-9de9-8ce61eb5a7b7",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2768,
        864
      ],
      "parameters": {
        "width": 160,
        "height": 224,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "60da89e6-5be0-4ab5-8169-5512ba5e12c2",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2960,
        544
      ],
      "parameters": {
        "width": 224,
        "height": 560,
        "content": "## Collection of responses  & Formatting\n\n\n**Combines all five responses into a single result**\n\n**Organizes the data & formats it for final output**"
      }
    },
    {
      "id": "e9e1eb15-6f76-4d6c-a958-84a4c4a04fff",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        272
      ],
      "parameters": {
        "width": 672,
        "height": 1040,
        "content": "\n## Merge Strategy\n\n**Combines responses 2 at a time:**\n**1+2 → 3+4 → Combine → Add 5th**\n\n**Why not merge all 5 at once?**\n**More reliable. Never loses responses.**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "9c03b5a4-7abc-4fce-969b-2994fff4d1fd",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        176
      ],
      "parameters": {
        "width": 368,
        "height": 80,
        "content": "\n## AI Processing & Error Handling"
      }
    }
  ],
  "connections": {
    "PhD": {
      "main": [
        [
          {
            "node": "Grad + PhD",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "5-Year-Old Story Mode",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Teenager Level",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Graduate Level",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PhD Research Level",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Business Executive Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business": {
      "main": [
        [
          {
            "node": "All 5 Levels",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Graduate": {
      "main": [
        [
          {
            "node": "Grad + PhD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Teenager": {
      "main": [
        [
          {
            "node": "Child + Teen",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "5-Year-Old": {
      "main": [
        [
          {
            "node": "Child + Teen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grad + PhD": {
      "main": [
        [
          {
            "node": "First 4 Levels",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "All 5 Levels": {
      "main": [
        [
          {
            "node": "Aggregate & Structure All Responses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Child + Teen": {
      "main": [
        [
          {
            "node": "First 4 Levels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "First 4 Levels": {
      "main": [
        [
          {
            "node": "All 5 Levels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Graduate Level": {
      "main": [
        [
          {
            "node": "Graduate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Teenager Level": {
      "main": [
        [
          {
            "node": "Teenager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "5-Year-Old Story Mode",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Teenager Level",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Graduate Level",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "PhD Research Level",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Business Executive Level",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Query Data": {
      "main": [
        [
          {
            "node": "Route to Appropriate Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PhD Research Level": {
      "main": [
        [
          {
            "node": "PhD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5-Year-Old Story Mode": {
      "main": [
        [
          {
            "node": "5-Year-Old",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive User Question": {
      "main": [
        [
          {
            "node": "Extract Query Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business Executive Level": {
      "main": [
        [
          {
            "node": "Business",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Plain Text for Docs": {
      "main": [
        [
          {
            "node": "Archive to Google Docs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Appropriate Level": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format 6 Messages for Telegram": {
      "main": [
        [
          {
            "node": "Send to User via Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate & Structure All Responses": {
      "main": [
        [
          {
            "node": "Format 6 Messages for Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format Plain Text for Docs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}