{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "8db98853-bc69-4139-a08a-e0df3a6a0187",
      "name": "\ud83d\udce9 Receive Telegram Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -320,
        1616
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1fd92fc6-1992-4ba9-ac35-404d99b6aa46",
      "name": "\ud83d\udcca Fetch Usage Logs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        1792
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.message.from.id }}",
              "lookupColumn": "user_id"
            },
            {
              "lookupValue": "={{ new Date().toISOString().slice(0,10) }}",
              "lookupColumn": "date"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2060422727,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k/edit#gid=2060422727",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k/edit?usp=drivesdk",
          "cachedResultName": "AI bot usage statistic"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "3ff699b8-5db7-40fb-be90-69f0c1052aad",
      "name": "\ud83d\udcc8 Count Today\u2019s Requests",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        368,
        1792
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "c0db9e37-dd77-469d-a055-b1e7f097293d",
      "name": "\ud83d\udd22 Set Daily Limit",
      "type": "n8n-nodes-base.set",
      "position": [
        592,
        1792
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1514c5a1-1bd4-4ba2-8bb9-30c679ae4f8e",
              "name": "daily_limit",
              "type": "number",
              "value": 5
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f5421fea-d1a1-4701-9c71-7cf6b5f3df18",
      "name": "\ud83d\udea6 Check Limit Exceeded?",
      "type": "n8n-nodes-base.if",
      "position": [
        848,
        1792
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "08e8aac4-9f6a-4fc0-b1ad-7d8493ff74bf",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{$('\ud83d\udcc8 Count Today\u2019s Requests').item.json.data.length }}",
              "rightValue": "={{ $json.daily_limit }}"
            }
          ]
        }
      },
      "executeOnce": false,
      "typeVersion": 2.2
    },
    {
      "id": "7a6ba155-4fb2-49bd-ba87-762dc0d564b8",
      "name": "\ud83d\udeab Notify: Limit Exceeded",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1120,
        1808
      ],
      "parameters": {
        "text": "=Sorry! Your *daily limit of {{ $('\ud83d\udd22 Set Daily Limit').item.json.daily_limit }} generations* is exceeded!",
        "chatId": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "89bf72a1-41f0-45bf-832d-9603c525c5ee",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        1424
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 464,
        "content": "## Incoming Message\n### Handle incoming user messages from Telegram."
      },
      "typeVersion": 1
    },
    {
      "id": "62dbe03c-45eb-4353-9c96-83eeaf0bd750",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        1696
      ],
      "parameters": {
        "width": 1200,
        "height": 288,
        "content": "##  Usage Limit Check\n### Check how many times the user has generated today and enforce the daily limit.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b74b4b6c-caa2-49d0-aa93-c564f5e99716",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        1360
      ],
      "parameters": {
        "color": 4,
        "width": 1664,
        "height": 320,
        "content": "## Delivery & Logging\n### Send the final image and caption to the user, and log the result to Google Sheets.\n\n\n\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1df08c50-f38d-430a-8d0b-db6df1461265",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -400
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 672,
        "content": "# \ud83e\udde0 AI Chat & Model Selector Bot \u2014 Telegram + AIMLAPI (via n8n)\n\nThis workflow enables Telegram users to interact with multiple AI models via dynamic prompts. \nUsers specify the desired model by sending a message in the format:\n\n```\n#model_id [your prompt text here]\n```\n\nAdditionally, users can request a list of available models by sending the command `/models`.\n\n---\n\n## \ud83d\ude80 Key Features:\n- **Multi-model selection via hashtags:** Example `#openai/gpt-4o What is AI?`\n- **/models command**: Lists all available model IDs grouped by provider.\n- **Daily generation limit per user:** Enforced via Google Sheets.\n- **Automatic model validation:** Ensures model_id exists before generation.\n- **Seamless Telegram interaction**: Responses are sent back to the chat.\n- **Activity logging:** Every query & result is logged in Google Sheets."
      },
      "typeVersion": 1
    },
    {
      "id": "1510f325-a221-4880-b198-8696b2e47329",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        288
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 784,
        "content": "## \u2699\ufe0f Customization Options:\n- The **daily limit** can be configured in the `Set Daily Limit` node.\n- You can expand functionality by adding:\n  * NSFW content filtering.\n  * Shortcuts/Aliases for models (e.g., `#fast` =&gt; Groq model).\n  * Additional commands like `/help`, `/usage`, `/history`.\n  * Custom response formatting (e.g., Markdown styling, emojis).\n  * Per-user API key support (multi-tenant).\n\n---\n\n## \ud83d\udca1 Example User Flow:\n\n### 1. User initiates chat with a model:\n```\n#openai/gpt-4o Explain Quantum Computing.\n```\n- The bot parses the model_id and sends the prompt to AI/ML API.\n- The AI's response is returned in Telegram.\n\n### 2. User requests available models:\n```\n/models\n```\n- The bot fetches the latest model list from AI/ML API.\n- The models are grouped by provider and sent as multiple messages.\n\n### 3. Daily Limit Enforcement:\n- Each user has a daily limit (default: 5).\n- If exceeded, the bot replies with:\n```\nSorry! Your daily limit of 5 generations is exceeded!\n```"
      },
      "typeVersion": 1
    },
    {
      "id": "84cd9c4f-7e93-4859-8025-2bc23815420e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -400
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 976,
        "content": "# \ud83d\udee0 Setup Guide for Deployment\n\n### 1. \ud83d\udcf2 Telegram Bot Creation:\n- Go to [@BotFather](https://t.me/BotFather)\n- Use `/newbot`, set a name and username.\n- Save the provided API token.\n\n---\n\n### 2. \ud83d\udd10 Telegram API Credentials in n8n:\n- Navigate to `Credentials` in n8n.\n- Add a new `Telegram API` credential.\n- Paste the BotFather token.\n\n---\n\n### 3. \ud83d\udcd7 Google Sheets Setup:\n- Create a new Google Sheet named `Sheet1`.\n- Add the following headers:\n```\nuser_id | date | query | result\n```\n- Share access to your **Google Service Account** or **OAuth email** \n(depending on your Google Sheets integration in n8n).\n\n---\n\n### 4. \ud83d\udd0c AIMLAPI API Key Configuration:\n- Obtain your API Key from [AI/ML API](https://aimlapi.com/app).\n- In n8n, create a new `AI/ML API` credential:\n* Base URL: `https://api.aimlapi.com/v1`\n* API Key: your_key_here.\n- Test the connection.\n\n---\n\n### 5. \u2699\ufe0f Optional Enhancements:\n- Implement caching of model lists.\n- Add interactive inline buttons (e.g., \u201cSelect Model\u201d UX).\n- Implement per-user statistics dashboard."
      },
      "typeVersion": 1
    },
    {
      "id": "72dc8e96-7dac-435c-815b-17e898432a63",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        592
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 480,
        "content": "## \ud83d\udcc1 Data Logged to Google Sheets:\nFor each successful generation, the following data is logged:\n| user_id | date | query | result |\n| ------- | ---- | ----- | ------ |\n\nThis log helps monitor usage limits, analyze user behavior, and track API interactions.\n\n---\n\n## \ud83e\uddea Testing & Debugging Tips:\n- Use a **separate Telegram chat/channel** for testing.\n- Add `Set` or `Console` nodes to inspect payloads for debugging.\n- Always test via **sending real messages to the bot**, not through n8n's \u201cExecute Node\u201d.\n- Test `/models` command thoroughly \u2014 ensure it splits long lists into multiple messages.\n- Validate edge cases:\n  * Missing `#model_id`\n  * Exceeding daily limits\n  * Invalid or deprecated model IDs\n- Regularly monitor Google Sheets for log integrity."
      },
      "typeVersion": 1
    },
    {
      "id": "aa89ce2b-a680-4c1a-b4a5-455a81030814",
      "name": "Send a chat action",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1104,
        1472
      ],
      "parameters": {
        "chatId": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.chat.id }}",
        "operation": "sendChatAction"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cae25ff0-5690-43f0-8245-0ed7d97b66dc",
      "name": "Get Models List",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        1504
      ],
      "parameters": {
        "url": "https://api.aimlapi.com/v1/models",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "bf1b163d-58e4-4cc0-b8cd-4317fe0c5e42",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        592,
        1504
      ],
      "parameters": {
        "text": "={{ $json.content }}",
        "chatId": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7d506e29-9e47-4e24-8354-a1a311e6bdff",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        1504
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "data = _input.first().json['data']\n\ngrouped_models = {}\n\nfor item in data:\n    if item.get('type') != 'chat-completion':\n        continue\n\n    developer = item.get('info', {}).get('developer', 'Unknown')\n    model_entry = {\n        'id': item.get('id'),\n        'name': item.get('info', {}).get('name', item.get('id'))\n    }\n\n    if developer not in grouped_models:\n        grouped_models[developer] = []\n\n    grouped_models[developer].append(model_entry)\n\n# \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430\noutput_items = []\n\nfor developer, models in grouped_models.items():\n    lines = [f\"\ud83e\uddd1\u200d\ud83d\udcbb *{developer}*\"]\n    for model in models:\n        lines.append(f\"\u2022 `{model['id']}` \u2014 {model['name']}\")\n    \n    content = \"\\n\".join(lines)\n    output_items.append({'json': {'content': content}})\n\nreturn output_items\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5e370157-362d-407d-95bf-b9345d6e99e6",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2032,
        1488
      ],
      "parameters": {
        "text": "={{ $json.content }}",
        "chatId": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b0e40f9a-e30d-4fd8-a23d-61bc3bca8d5a",
      "name": "\ud83d\udcdd Log Successful Generation1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2224,
        1488
      ],
      "parameters": {
        "columns": {
          "value": {
            "date": "={{ new Date().toISOString().slice(0,10) }}",
            "query": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.text }}",
            "result": "={{ $json.result.text }}",
            "user_id": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.from.id }}"
          },
          "schema": [
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "query",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "query",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "result",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 2060422727,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1RHgZNdT0whop0JY3vrj83yLtmVluG73NIfLBBa8ckPg/edit#gid=2060422727",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k/edit?usp=drivesdk",
          "cachedResultName": "AI bot usage statistic"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "e7b00f33-4464-4567-97d6-cef34ad9c33f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        1360
      ],
      "parameters": {
        "width": 640,
        "height": 320,
        "content": "##  Usage Limit Check\n### Check how many times the user has generated today and enforce the daily limit.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "16f0d8de-fcee-44e7-b5ef-e28980d3395c",
      "name": "Get Models Or Process Message?",
      "type": "n8n-nodes-base.switch",
      "position": [
        -128,
        1616
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Get Models",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "efff9014-b37a-443e-b888-fd9a8eb97f3f",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": "/models"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Process Message",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "8b39b996-fd2e-4070-9800-1a7b0bdc5f76",
                    "operator": {
                      "type": "string",
                      "operation": "notEmpty",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json.message.text }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "7163b2e1-96ff-4965-a3ab-91e2d68a6a33",
      "name": "\ud83e\udde0 Generate Msg (AI/ML API | GPT-4o)",
      "type": "n8n-nodes-aimlapi.aimlApi",
      "position": [
        1712,
        1536
      ],
      "parameters": {
        "model": "openai/gpt-4o",
        "prompt": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.text }}",
        "options": {},
        "requestOptions": {}
      },
      "credentials": {
        "aimlApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b942da4d-2dc2-4773-b3a9-3b700d8838c6",
      "name": "\ud83e\udde0 Generate Msg (AI/ML API | Custom Model)",
      "type": "n8n-nodes-aimlapi.aimlApi",
      "position": [
        1824,
        1376
      ],
      "parameters": {
        "model": "={{ $json.model_id }}",
        "prompt": "={{ $json.message }}",
        "options": {},
        "requestOptions": {}
      },
      "credentials": {
        "aimlApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2bbb1df7-7035-475c-ae62-e8996f22bea1",
      "name": "Group Models By Providers",
      "type": "n8n-nodes-base.code",
      "position": [
        1616,
        1376
      ],
      "parameters": {
        "jsCode": "const text = $('\ud83d\udce9 Receive Telegram Message').first().json.message.text;\n\nif (!text.startsWith('#')) {\n  throw new Error('Message must start with a #model_tag');\n}\n\nconst parts = text.split(' ', 2);\n\nif (parts.length &lt; 2) {\n  throw new Error('Message must contain both #model_tag and prompt text.');\n}\n\nconst model_id = parts[0].substring(1);  // \u0423\u0431\u0438\u0440\u0430\u0435\u043c #\nconst message = parts[1];\n\nreturn [\n  {\n    json: {\n      model_id,\n      message\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "214a99db-facf-4515-9a62-111d8eedbe84",
      "name": "Set Custom Model?",
      "type": "n8n-nodes-base.if",
      "position": [
        1392,
        1472
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8f4473af-8528-4286-a12f-d51d70615e3b",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              },
              "leftValue": "={{ $('\ud83d\udce9 Receive Telegram Message').item.json.message.text }}",
              "rightValue": "#"
            }
          ]
        }
      },
      "typeVersion": 2.2
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Models List": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Custom Model?": {
      "main": [
        [
          {
            "node": "Group Models By Providers",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\ud83e\udde0 Generate Msg (AI/ML API | GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a chat action": {
      "main": [
        [
          {
            "node": "Set Custom Model?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message1": {
      "main": [
        [
          {
            "node": "\ud83d\udcdd Log Successful Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd22 Set Daily Limit": {
      "main": [
        [
          {
            "node": "\ud83d\udea6 Check Limit Exceeded?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcca Fetch Usage Logs": {
      "main": [
        [
          {
            "node": "\ud83d\udcc8 Count Today\u2019s Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Group Models By Providers": {
      "main": [
        [
          {
            "node": "\ud83e\udde0 Generate Msg (AI/ML API | Custom Model)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udea6 Check Limit Exceeded?": {
      "main": [
        [
          {
            "node": "Send a chat action",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\ud83d\udeab Notify: Limit Exceeded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcc8 Count Today\u2019s Requests": {
      "main": [
        [
          {
            "node": "\ud83d\udd22 Set Daily Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce9 Receive Telegram Message": {
      "main": [
        [
          {
            "node": "Get Models Or Process Message?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Models Or Process Message?": {
      "main": [
        [
          {
            "node": "Get Models List",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\ud83d\udcca Fetch Usage Logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udde0 Generate Msg (AI/ML API | GPT-4o)": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udde0 Generate Msg (AI/ML API | Custom Model)": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}