{
  "id": "ofy3xqsKedoTQCso",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Retro Console Upload",
  "tags": [],
  "nodes": [
    {
      "id": "e4dce217-5771-4240-b774-c119307ac591",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        200,
        -200
      ],
      "parameters": {
        "text": "={{ $json.query.prompt }}",
        "options": {
          "systemMessage": "=You are an AI assistant. Answer short, cynical and dry using the following tools:\n\n1. Search the news\n2. Search the stock market\n3. Search X\n4. Obtain date and time\n5. Send a Telegram message \n6. Search Gmail inbox\n7. Search events in Google Calendar\n8. Search RSS newspaper headlines\n\nYou can also use your default knowledge base.\n\nIf you are asked to send a Telegram, use as the Telegram body, the information sent by the user or the output from other tool.\n\nIf you are asked for news about a subject, retrieve up to 5 news and summarize\n\nIf you are asked to Search X, use as the search input the term provided by the user. **IMPORTANT:** The X tool has strict rate limits. Do not make rapid, consecutive calls to this tool. If you need to make multiple Twitter requests, space them out. If you encounter an error related to 'Too Many Requests', you must wait a reasonable amount of time (e.g., 60 seconds) before trying again or inform the user about the rate limit.\n\nIf you are asked to search the calendar use the Google Calendar tool.\n\nIf you are asked to search the inbox use the Gmail tool\n\nIf you are asked about a Linux command, answer starting with $ and the Linux command requested only. Example, user says Whats the linux command to list files, you answer:$ ls"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "09ad554a-fa2e-4913-a8e9-fc8ba9e8c936",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        100,
        100
      ],
      "parameters": {
        "sessionKey": "={{$json.query.sessionId}}",
        "sessionIdType": "customKey",
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "07d1f039-8a01-4aea-a93f-3c8cb6daf647",
      "name": "Date & Time",
      "type": "n8n-nodes-base.dateTimeTool",
      "position": [
        380,
        100
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "0c925661-dff4-46c2-818d-1cb9d5df462c",
      "name": "LLM Gemini 2.5 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -100,
        100
      ],
      "parameters": {
        "options": {
          "maxOutputTokens": 2048
        },
        "modelName": "models/gemini-2.5-flash"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5e09f0a8-6e37-4e9b-9d51-60664ea58c38",
      "name": "Search Tweets",
      "type": "n8n-nodes-base.twitterTool",
      "position": [
        860,
        100
      ],
      "parameters": {
        "limit": 10,
        "operation": "search",
        "searchText": "={{ $fromAI('Search_Term', `Use the search term provided`, 'string') }}",
        "descriptionType": "manual",
        "toolDescription": "Search X according to user's search terms",
        "additionalFields": {
          "tweetFieldsObject": [
            "text",
            "author_id"
          ]
        }
      },
      "credentials": {
        "twitterOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "220c24e7-1e3c-4344-acfd-f036a3d0b298",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -220
      ],
      "parameters": {
        "content": "## In\nReceives console command. Example: \"what's in my inbox?\""
      },
      "typeVersion": 1
    },
    {
      "id": "d5fa0f6c-9f25-4267-9a97-6bc868d36525",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -220
      ],
      "parameters": {
        "content": "## Out\nSend AI agent response back to the console. Example: \"AI $ you have 3 unread emails\""
      },
      "typeVersion": 1
    },
    {
      "id": "343b9723-f1e5-478f-9bbc-5b73ae74c43a",
      "name": "Console In",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        -200
      ],
      "parameters": {
        "path": "8d6b9886-7cc4-470f-84fa-02954655b297",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "ef85b5cc-2b88-4bf4-a6b2-0bd1055518c0",
      "name": "Console out",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        560,
        -200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.4
    },
    {
      "id": "42f3318e-536a-43b4-b20b-3b0fd1ebea79",
      "name": "Stock info",
      "type": "n8n-nodes-base.marketstackTool",
      "position": [
        540,
        100
      ],
      "parameters": {
        "symbol": "={{ $fromAI('Ticker', ``, 'string') }}",
        "resource": "ticker",
        "descriptionType": "manual",
        "toolDescription": "Get stock market news about a ticker"
      },
      "credentials": {
        "marketstackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c8786788-41f4-4f5b-8460-0803a825f1f1",
      "name": "RSS news",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        700,
        100
      ],
      "parameters": {
        "url": "https://www.clarin.com/rss/lo-ultimo/",
        "options": {
          "ignoreSSL": false
        },
        "toolDescription": "Headlines from Clarin newspaper"
      },
      "typeVersion": 1.2
    },
    {
      "id": "b89de3fb-91e9-42a0-be86-460280b9a07a",
      "name": "Send Telegram",
      "type": "n8n-nodes-base.telegramTool",
      "position": [
        1380,
        100
      ],
      "parameters": {
        "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Text', ``, 'string') }}",
        "chatId": "=YOUR_CHAT_ID",
        "descriptionType": "manual",
        "toolDescription": "Send a text message with Telegram with text defined by the user. Text could be a message by the user or the output from other tool.",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f9699166-a521-4d89-b90e-506172cbd5c6",
      "name": "Read Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        1020,
        100
      ],
      "parameters": {
        "limit": 10,
        "filters": {},
        "operation": "getAll",
        "descriptionType": "manual",
        "toolDescription": "Search Gmail inbox"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "cf6e1e98-323b-4be7-95d8-ffa49e545c89",
      "name": "Check Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1200,
        100
      ],
      "parameters": {
        "limit": 10,
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_EMAIL",
          "cachedResultName": "YOUR_EMAIL"
        },
        "operation": "getAll",
        "descriptionType": "manual",
        "toolDescription": "Search for events in the calendar"
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "settings": {
    "timezone": "America/Argentina/Buenos_Aires",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "9952f58e-967d-4cf0-a1a2-2c8838a6af47",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Console out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS news": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Console In": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Stock info": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search Tweets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send Telegram": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "LLM Gemini 2.5 Flash": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}