{
  "id": "BTnE5RUvVamK64A3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Tesla News and Sentiment Analyst Tool n8n",
  "tags": [],
  "nodes": [
    {
      "id": "4003f0ec-f9c2-49f0-8aab-72c7f0a8b9ff",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -120,
        300
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "message"
            },
            {
              "name": "sessionId"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "d9113a0b-296a-43fb-b2de-9fa7ac9f4b60",
      "name": "Tesla News and Sentiment Analyst",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        300
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "You are a Tesla News and Sentiment Analyst AI powered by DeepSeek.\n\nYour role is to analyze Tesla-related headlines across trusted news feeds and produce structured sentiment insight for investors and swing traders.\n\nYou are always connected to the following live news sources via RSS:\n\n- Google News (filtered by Tesla/TSLA stock)\n- Yahoo Finance (TSLA-specific)\n- Electrek (Tesla news)\n- CleanTechnica (Tesla archive)\n- TeslaNorth\n\n\ud83e\udde0 You must always call all 5 tools during analysis to ensure full market coverage.\n\nFor each execution, follow these steps:\n\n1. Collect and read articles from all sources.\n2. Extract top 3\u20135 headlines that are most relevant to Tesla's financial, technical, or macro outlook.\n3. Classify sentiment as:\n   - **Bullish** (positive impact on TSLA)\n   - **Bearish** (negative impact on TSLA)\n   - **Neutral** (mixed or inconclusive)\n4. Write a clear, 2\u20133 sentence **news sentiment summary** highlighting the major drivers of sentiment (e.g. earnings, product updates, factory news, market reactions).\n5. Output in strict JSON format.\n\n\ud83d\udeab Never output anything other than the structured JSON response.\n\n\u2705 Format:\n\n```json\n{\n  \"sentiment\": \"bullish\",\n  \"summary\": \"Tesla's stock is climbing after it beat Q1 delivery estimates and announced progress on the Cybertruck ramp-up. Analysts are reacting positively to recent margin recovery hints.\",\n  \"topHeadlines\": [\n    \"Tesla beats Q1 delivery forecast \u2013 Yahoo Finance\",\n    \"Cybertruck production scaling in Austin \u2013 Electrek\",\n    \"Tesla Model Y becomes top-selling EV in Europe \u2013 CleanTechnica\"\n  ]\n}\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "b43759f2-87d2-410c-a33a-84af4c93862e",
      "name": "RSS - TeslaNorth",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        1320,
        640
      ],
      "parameters": {
        "url": "https://teslanorth.com/feed/",
        "options": {},
        "toolDescription": "This node retrieves Tesla-focused news from TeslaNorth\u2019s RSS feed. TeslaNorth provides daily updates on software releases, feature rollouts, vehicle pricing changes, charging infrastructure, and app enhancements.\n\nIt\u2019s a fast, dedicated source ideal for capturing technical and consumer sentiment trends\u2014especially useful for tracking real-time updates that may not yet reach major financial media."
      },
      "typeVersion": 1.1
    },
    {
      "id": "dc9766af-f3cf-4c56-9675-f308952a7d5d",
      "name": "RSS - Google News Tesla-specific",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        360,
        640
      ],
      "parameters": {
        "url": "https://news.google.com/rss/search?q=Tesla+OR+TSLA+stock&hl=en-US&gl=US&ceid=US:en",
        "options": {},
        "toolDescription": "This node pulls the latest Tesla-related headlines using the Google News RSS feed filtered by the search query Tesla OR TSLA stock. It aggregates news articles from multiple top-tier sources like CNBC, Reuters, Bloomberg, and more. The feed is regionally scoped to the U.S. and provided in English.\n\nThis node is typically used as the first step in Tesla sentiment analysis, providing real-time news updates for downstream summarization and sentiment classification."
      },
      "typeVersion": 1.1
    },
    {
      "id": "acfe1510-c3cd-4aea-9a22-ea5a4a9969fa",
      "name": "RSS - Electrek Tesla",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        600,
        640
      ],
      "parameters": {
        "url": "https://electrek.co/guides/tesla/feed/",
        "options": {},
        "toolDescription": "This node fetches Tesla-focused news from Electrek, a trusted source for electric vehicle and clean energy industry reporting. The feed includes updates on Tesla vehicles, software, charging infrastructure, factory production, and executive announcements.\n\nElectrek is considered one of the most in-depth sources for Tesla technology and operations, making it ideal for high-quality sentiment analysis beyond just stock price speculation.\n"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0410c7e4-49f0-4dcb-83c6-47d69a805f4e",
      "name": "RSS - Yahoo Finance TSLA",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        840,
        640
      ],
      "parameters": {
        "url": "https://feeds.finance.yahoo.com/rss/2.0/headline?s=TSLA&region=US&lang=en-US",
        "options": {},
        "toolDescription": "This node pulls TSLA-specific financial news from Yahoo Finance, offering timely updates on stock movements, earnings reports, analyst upgrades/downgrades, and broader market trends that impact Tesla. The feed is curated to provide high-signal information for traders and investors focused on Tesla\u2019s financial outlook.\n\nIt\u2019s ideal for generating sentiment insights directly tied to stock price catalysts and market positioning."
      },
      "typeVersion": 1.1
    },
    {
      "id": "13b3c9e9-6f27-47ca-81b3-0b1dcd6e83f6",
      "name": "RSS - CleanTechnica Tesla Archives",
      "type": "n8n-nodes-base.rssFeedReadTool",
      "position": [
        1080,
        640
      ],
      "parameters": {
        "url": "https://cleantechnica.com/tag/tesla/feed/",
        "options": {},
        "toolDescription": "This node pulls Tesla-related content from CleanTechnica's Tesla archive RSS feed. It includes coverage of Tesla\u2019s clean energy initiatives, vehicle technology, charging networks, battery advancements, and policy impacts.\n\nCleanTechnica offers insightful, environmentally focused reporting that adds depth to Tesla sentiment analysis, especially around sustainability and innovation narratives."
      },
      "typeVersion": 1.1
    },
    {
      "id": "2b6f6765-5c71-4324-9d6b-784fb5b3edc9",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        20,
        640
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "c3880bbb-3238-43bb-b4a0-11cdd0da8154",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        -300,
        640
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "deepSeekApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "554f078b-2c38-4bb0-97f7-f8bbc577d0da",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        100
      ],
      "parameters": {
        "color": 4,
        "width": 280,
        "height": 380,
        "content": "## Trigger from Parent Workflow \nThis node activates the workflow when called to execute Workflow action from the **Tesla Quant Trading AI Agent**. Ensure proper inputs **message, sessionId** are passed."
      },
      "typeVersion": 1
    },
    {
      "id": "06136f71-ea9a-42a0-b12b-cb1df01fe980",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        600
      ],
      "parameters": {
        "color": 3,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## Short-Term Memory Module\nMaintains **short-term** reasoning context across **Tesla-related prompts**.\n\nAllows the analyst to track session logic for **headline alignment** and **avoid duplicate analysis**.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "df12641e-8bf0-4c5f-a934-71a3c6b3363d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        600
      ],
      "parameters": {
        "color": 2,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83e\udde0 DeepSeek (News Parsing)\nThis node uses the **DeepSeek LLM** to:\n\u2022 Parse all recent **headlines**\n\u2022 **Detect tone, narrative themes, and signal patterns**\n\u2022 Extract **structured summaries** for the **AI Agent**\n\nThis model **outputs raw insight, not final decision**.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a53b7ad4-270a-4989-ab10-f1b1bc18451f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        600
      ],
      "parameters": {
        "color": 6,
        "width": 1240,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## \ud83d\udcf0 News Feeds (Tools) \nThese RSS nodes fetch Tesla-specific news used for **sentiment analysis**:\n\u2022 **Google News (Tesla / TSLA)**\n\u2022 **Yahoo Finance TSLA**\n\u2022 **Electrek (EV news)**\n\u2022 **CleanTechnica (sustainability)**\n\u2022 **TeslaNorth (product updates)**\n\nAll **5 sources** are **required for full market coverage**."
      },
      "typeVersion": 1
    },
    {
      "id": "18e103b1-3e6f-4954-88e2-d51a05070e7f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        40
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 440,
        "content": "## \ud83d\udcca News Sentiment Analyst Agent\n\nThis is the core **Tesla Sentiment AI Agent**.\n\n**Responsibilities**:\n\u2022 Combine **LLM output across all sources**\n\u2022 Generate final **JSON output**:\n   - sentiment: **bullish/bearish/neutral**\n   - summary: **2\u20133 sentence report**\n   - topHeadlines: **3\u20135 key headlines**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "37533426-bb9a-404e-ae2b-11e4a3a34bb3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1560,
        -1340
      ],
      "parameters": {
        "width": 1260,
        "height": 2420,
        "content": "## \ud83d\udcd8 Tesla News and Sentiment Analyst Tool\n\n### \ud83d\udd27 Purpose:\n\nThis workflow powers the **sentiment analysis engine** for TSLA trading. It continuously scrapes Tesla-related headlines from **five trusted RSS sources** and uses a DeepSeek LLM agent to classify overall market sentiment and extract a structured news summary. It plays a crucial role in informing both **spot and leveraged trading strategies** within the larger Tesla Quant Trading AI system.\n\n---\n\n### \ud83d\udcc2 Required Dependencies:\n\nTo operate properly, ensure the following workflows are installed:\n\n* \u2705 Tesla Quant Trading AI Agent (calls this tool via webhook)\n* \u2705 n8n credentials: **DeepSeek API key**\n* \u2705 Internet access for live RSS feed scraping\n\n---\n\n### \ud83d\udee0\ufe0f Step-by-Step Installation:\n\n1. **Import Workflow**\n\n   * Load this JSON into your n8n workspace.\n   * Name it: `Tesla_News_and_Sentiment_Analyst_Tool`\n\n2. **Set Up DeepSeek Credentials**\n\n   * Go to **Credentials \u2192 Add New**\n   * Choose: `DeepSeek API`\n   * Save under name: `DeepSeek account`\n\n3. **Review Node Functions**\n\n   | Node                                 | Function                                                |\n   | ------------------------------------ | ------------------------------------------------------- |\n   | `When Executed by Another Workflow`  | Triggered externally via `Tesla Quant Trading AI Agent` |\n   | `RSS - Google News Tesla-specific`   | Scrapes Tesla news across top global financial outlets  |\n   | `RSS - Yahoo Finance TSLA`           | Captures TSLA stock-specific financial articles         |\n   | `RSS - Electrek Tesla`               | Tracks technical updates, factory news, vehicle data    |\n   | `RSS - CleanTechnica Tesla Archives` | Offers clean energy sentiment and battery/solar news    |\n   | `RSS - TeslaNorth`                   | Gets consumer-level updates like pricing, app changes   |\n   | `Simple Memory`                      | Retains context for the LLM during each run             |\n   | `DeepSeek Chat Model`                | LLM responsible for analyzing raw headlines             |\n   | `Tesla News and Sentiment Analyst`   | Aggregates data, summarizes, and formats final output   |\n\n4. **Trigger From Main Agent**\n\n   * The Tesla Quant Trading AI Agent uses this via `Execute Workflow` node.\n   * It sends in `message` and `sessionId` inputs, required for context.\n\n---\n\n### \ud83e\udde0 AI Logic\n\n* The `DeepSeek Chat Model` reads from all 5 news feeds.\n* The `Tesla News and Sentiment Analyst` agent performs the following:\n\n  * Extracts top 3\u20135 headlines relevant to trading signals\n  * Classifies sentiment as: **bullish**, **bearish**, or **neutral**\n  * Produces a **2\u20133 sentence summary** of the current Tesla narrative\n\n\u2705 Output Format (example):\n\n```json\n{\n  \"sentiment\": \"bullish\",\n  \"summary\": \"Tesla stock rallied today after strong delivery numbers and news of Cybertruck production progress. Analysts are increasingly optimistic.\",\n  \"topHeadlines\": [\n    \"Tesla beats Q2 delivery forecast \u2013 Yahoo Finance\",\n    \"Cybertruck ramps up in Texas \u2013 Electrek\",\n    \"Berlin Gigafactory expands battery production \u2013 CleanTechnica\"\n  ]\n}\n```\n\n---\n\n### \ud83d\udd01 Trigger Flow\n\nThis workflow is **not standalone**. It must be called from a parent agent like:\n\n* `Tesla_Quant_Trading_AI_Agent`\n* Input must include:\n\n  * `message`: prompt context (optional)\n  * `sessionId`: to scope memory session\n\n---\n\n### \ud83e\uddfe Sticky Notes (Node Labels)\n\n| Sticky Note                        | Purpose                                                              |\n| ---------------------------------- | -------------------------------------------------------------------- |\n| \u2705 **Trigger from Parent Workflow** | Describes the node used to receive execution trigger from main agent |\n| \u2705 **Short-Term Memory Module**     | Notes that memory is used to hold session-specific context           |\n| \u2705 **DeepSeek (News Parsing)**      | Clarifies this is the LLM responsible for interpreting headline tone |\n| \u2705 **News Feeds (Tools)**           | Outlines the 5 RSS tools and their data sources                      |\n| \u2705 **News Sentiment Analyst Agent** | Explains final AI agent role and output format                       |\n\n---\n\n## \ud83d\ude80 Support & Licensing\n\n\ud83d\udd17 **Don Jayamaha \u2013 LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n\u00a9 2025 Treasurium Capital Limited Company. All rights reserved.\nThis AI workflow architecture, including logic, design, and prompt structures, is the intellectual property of Treasurium Capital Limited Company. Unauthorized reproduction, redistribution, or resale is prohibited under U.S. copyright law. Licensed use only.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "32533aa3-e569-40cc-ae52-62f0d93db532",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "RSS - TeslaNorth": {
      "ai_tool": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RSS - Electrek Tesla": {
      "ai_tool": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "RSS - Yahoo Finance TSLA": {
      "ai_tool": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "RSS - Google News Tesla-specific": {
      "ai_tool": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS - CleanTechnica Tesla Archives": {
      "ai_tool": [
        [
          {
            "node": "Tesla News and Sentiment Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}