{
  "name": "AI-powered stock market summary bot",
  "nodes": [
    {
      "id": "f9e2b1a6-4bc4-429c-a516-78fc440cb259",
      "name": "Ticker List",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        0
      ]
    },
    {
      "id": "46c712d0-8e65-4da0-bdbc-9eadf4213f2f",
      "name": "Fetch Stock Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1020,
        0
      ]
    },
    {
      "id": "e8d96c0c-e927-4676-a02f-7729c0126165",
      "name": "Interpret Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        0
      ]
    },
    {
      "id": "5ace21ee-80b0-4d79-be68-ded17b53b5a2",
      "name": "Stock Analysis Assistant",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1440,
        0
      ]
    },
    {
      "id": "97f8d2af-02a9-4f93-8bf7-ee083b13dccf",
      "name": "Send Summary to User(s)",
      "type": "n8n-nodes-base.slack",
      "position": [
        1816,
        0
      ]
    },
    {
      "id": "21b091f5-ce81-4d98-8978-f7193734a72c",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        120,
        0
      ]
    },
    {
      "id": "94804d45-b868-4501-a53c-0a1063768f14",
      "name": "Check if Market is open",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        0
      ]
    },
    {
      "id": "8366acca-42ff-4106-8b37-316727ac8963",
      "name": "Market is Closed",
      "type": "n8n-nodes-base.noOp",
      "position": [
        800,
        200
      ]
    },
    {
      "id": "ee50cf08-efe2-4886-8527-23c069495afd",
      "name": "Check Market Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        360,
        0
      ]
    },
    {
      "id": "97de7640-5be5-4821-9cea-a8d481590256",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -360
      ],
      "parameters": {
        "width": 660,
        "height": null,
        "content": "# 🧠 Stock Analysis Assistant\n\nThis workflow analyzes selected S&P 500 stocks using RSI and MACD indicators, summarizes the insights into plain English, and posts an update to Slack every hour during U"
      }
    },
    {
      "id": "4c40864c-ad6d-420f-88b8-a497d7c71a5d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        -360
      ],
      "parameters": {
        "width": null,
        "height": 700,
        "content": "## 📅 Schedule Trigger\n\n**Node:** `Schedule Trigger`  \nRuns every hour between 6:30 AM and 2:30 PM (PST), Monday to Friday.  \n**Cron Expression:** `0 30 6-14 * * 1-5`\n\n⏰ Triggers analysis only during U"
      }
    },
    {
      "id": "28ee034a-cb6a-4a54-8ce1-fef5e439e2de",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -360
      ],
      "parameters": {
        "width": 460,
        "height": 700,
        "content": "## 🏛️ Market Status Check\n\n**Node:** `Check Market Status`  \nEndpoint: `https://paper-api.alpaca.markets/v2/clock`\n\nChecks if the market is open using Alpaca’s `/clock` endpoint.\n\n**Node:** `Check if "
      }
    },
    {
      "id": "ab88e6c4-bafb-47d6-9292-b54850f1d984",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -360
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": "## 📈 Ticker Setup\n\n**Node:** `Ticker List`  \nSets the stock symbols to be analyzed.\n\n📌 You can update this list to monitor different stocks."
      }
    },
    {
      "id": "01892c69-4c22-4c78-a1db-1add2d06993c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -360
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": "## 🔗 Fetch Stock Data\n\n**Node:** `Fetch Stock Data`  \nCalls Alpaca’s `/v2/stocks/bars` endpoint with:\n- `symbols`: from `Ticker List`\n- `timeframe`: `1Day`\n- `limit`: `1000`\n- `feed`: `iex` (avoid SIP"
      }
    },
    {
      "id": "a1b98ff6-b033-4f0c-90c6-b6bf2ea0e461",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1180,
        -360
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": "## 🧮 Interpret Data\n\n**Node:** `Interpret Data`  \nPython code calculates:\n- RSI(14)\n- MACD(12,26,9)\n- Decision status: `\"Buy\"`, `\"Hold\"`, or `\"Sell\"`\n\nOutputs:\n- `stocks`: a list of indicator values a"
      }
    },
    {
      "id": "0ac7e6ad-405e-46b6-81b9-3367c7793136",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        -360
      ],
      "parameters": {
        "width": 360,
        "height": 540,
        "content": "## 🤖 AI Assistant Summary\n\n**Node:** `Stock Analysis Assistant`  \nUses a custom OpenAI assistant to:\n- Group stocks into categories\n- Provide commentary in plain English\n- Teach users simple market be"
      }
    },
    {
      "id": "10b73555-9619-4327-beac-d36a5a88f844",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        180
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "91c98665-4226-4579-a9df-2dd4ad137638",
      "name": "End of Flow",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2040,
        0
      ]
    },
    {
      "id": "f11bdac9-2fbe-4ea5-a470-d89d26aa01ba",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        -360
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": "## 💬 Post to Slack\n\n**Node:** `Send Summary to User(s)`  \nSends the GPT-generated summary to Slack using:\n```js\n{{ $json.output }}\n```\n⚙️ Configured with the appropriate Slack user or channel."
      }
    },
    {
      "id": "8221dafd-302c-4bbe-9cea-25bdbe980acb",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        -360
      ],
      "parameters": {
        "width": 220,
        "height": 540,
        "content": ""
      }
    },
    {
      "id": "d492d1bc-99ba-43da-bf15-1cbe11badb13",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -180
      ],
      "parameters": {
        "width": 660,
        "height": 940,
        "content": "## 🤖 AI Assistant Prompt\n\nYou are a financial assistant writing a quick, readable market update for a general audience. Your job is to help people understand how well-known stocks are behaving — even "
      }
    }
  ],
  "connections": {
    "Ticker List": {
      "main": [
        [
          {
            "node": "Fetch Stock Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Interpret Data": {
      "main": [
        [
          {
            "node": "Stock Analysis Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Stock Data": {
      "main": [
        [
          {
            "node": "Interpret Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Check Market Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Market Status": {
      "main": [
        [
          {
            "node": "Check if Market is open",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Market is open": {
      "main": [
        [
          {
            "node": "Ticker List",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Market is Closed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Summary to User(s)": {
      "main": [
        [
          {
            "node": "End of Flow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stock Analysis Assistant": {
      "main": [
        [
          {
            "node": "Send Summary to User(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}