{
  "id": "FQ0Uljxi7aIBdTFX",
  "meta": {
    "instanceId": "workflow-a42ebca7",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:57.170513",
    "updatedAt": "2025-09-29T07:07:57.170590",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "Coinmarketcap Price Agent",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "nodes": [
    {
      "id": "4f7066a4-9baa-428e-8b98-f4a3d0a6cf8a",
      "name": "Telegram Send Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1280,
        0
      ],
      "webhookId": "0eeae020-ed6f-4900-ae38-d646d893171d",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "R3vpGq0SURbvEw2Z",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1,
      "notes": "This telegram node performs automated tasks as part of the workflow."
    },
    {
      "id": "39c91f2b-87ed-46e9-8cc4-8c6ea547f170",
      "name": "OpenAI Chat Model",
      "type": "n8n-nodes-base.noOp",
      "position": [
        660,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "yUizd8t0sD5wMYVG",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2,
      "notes": "This lmChatOpenAi node performs automated tasks as part of the workflow."
    },
    {
      "id": "c87b5030-de78-4b86-8bb3-b93ee6b76a54",
      "name": "Window Buffer Memory",
      "type": "n8n-nodes-base.noOp",
      "position": [
        820,
        320
      ],
      "parameters": {},
      "typeVersion": 1.3,
      "notes": "This memoryBufferWindow node performs automated tasks as part of the workflow."
    },
    {
      "id": "ae3ec7a6-bf62-4381-acf8-05c7c425f471",
      "name": "Telegram Trigger1",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        100,
        0
      ],
      "webhookId": "b33d2025-01c2-4386-b677-206a87a1856b",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "R3vpGq0SURbvEw2Z",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.1,
      "notes": "This telegramTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "3f3594f5-64d5-4d82-8d0f-0e5f58244d17",
      "name": "CoinMarketCap Price Agent",
      "type": "n8n-nodes-base.noOp",
      "notes": "{{ $json.sessionId }}",
      "position": [
        760,
        0
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "360dc88a-a714-4ceb-be25-5ebe7d1e0273",
      "name": "Adds SessionId",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b5c25cd4-226b-4778-863f-79b13b4a5202",
              "name": "sessionId",
              "type": "string",
              "value": "={{ $json.message.chat.id }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4,
      "notes": "This set node performs automated tasks as part of the workflow."
    },
    {
      "id": "8d53c2a0-a255-4fe9-8e5c-38c957825413",
      "name": "CoinMarketCap Price",
      "type": "n8n-nodes-base.noOp",
      "position": [
        980,
        320
      ],
      "parameters": {
        "url": "{{ $env.API_BASE_URL }}",
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "{{ $credentials.genericCredentialType }}",
        "genericAuthType": "httpHeaderAuth",
        "parametersQuery": {
          "values": [
            {
              "name": "symbol"
            },
            {
              "name": "convert",
              "value": "USD",
              "valueProvider": "fieldValue"
            }
          ]
        },
        "toolDescription": "The tool going to recieve input of cryptocurrency name and then request the price from CoinMarketCap and send the price back in a message.",
        "parametersHeaders": {
          "values": [
            {
              "name": "Accept",
              "value": "application/json",
              "valueProvider": "fieldValue"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "OKXROn8aWkgAOvvV",
          "name": "CoinMarketCap"
        }
      },
      "typeVersion": 1.1,
      "notes": "This toolHttpRequest node performs automated tasks as part of the workflow."
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "versionId": "595f494f-4109-4cd7-bf69-d1300d3a5408",
  "connections": {
    "8d53c2a0-a255-4fe9-8e5c-38c957825413": {
      "main": [
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-fc0aaa02",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-6ec783d5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-8e9ba28e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-e86e721f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-bdda3ea8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-40fe2800",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-495b6e4a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-8d53c2a0-a255-4fe9-8e5c-38c957825413-7edf2a34",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4f7066a4-9baa-428e-8b98-f4a3d0a6cf8a": {
      "main": [
        [
          {
            "node": "error-handler-4f7066a4-9baa-428e-8b98-f4a3d0a6cf8a-5997d2a8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "39c91f2b-87ed-46e9-8cc4-8c6ea547f170": {
      "main": [
        [
          {
            "node": "error-handler-39c91f2b-87ed-46e9-8cc4-8c6ea547f170-7b035395",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ae3ec7a6-bf62-4381-acf8-05c7c425f471": {
      "main": [
        [
          {
            "node": "error-handler-ae3ec7a6-bf62-4381-acf8-05c7c425f471-a6a88df5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "Automated workflow: Coinmarketcap Price Agent. This workflow processes data and performs automated tasks.",
  "notes": "Excellent quality workflow: Coinmarketcap Price Agent. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}