{
  "name": "Track and visualize daily moods with GPT-4o, Wolfram Alpha, Sheets, and Slack",
  "nodes": [
    {
      "id": "8eccdbf8-3950-4660-bad1-d97a744341f2",
      "name": "Webhook: Mood Input",
      "type": "n8n-nodes-base.webhook",
      "position": [
        544,
        832
      ]
    },
    {
      "id": "9383f009-71d7-4146-ad93-5b1d1220ebf7",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        736
      ]
    },
    {
      "id": "05a99125-61a9-444f-a18d-21bf4b742113",
      "name": "Prepare Data Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        736
      ]
    },
    {
      "id": "9d4ed4b4-3fdf-4a02-9501-0bbf1766c8cb",
      "name": "Create Wolfram Query",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        736
      ]
    },
    {
      "id": "af63908c-0915-4286-997d-50610c8ec6d1",
      "name": "Generate Mood Graph",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2144,
        736
      ]
    },
    {
      "id": "ce61267c-863e-4ce2-acc2-44fbbec5c123",
      "name": "Log Mood to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2368,
        736
      ]
    },
    {
      "id": "e404fca8-8ce1-452c-a7dd-8614755f8c6b",
      "name": "Return API Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2592,
        736
      ]
    },
    {
      "id": "45bb5ad6-42e5-41d0-ab50-785bbb313900",
      "name": "Webhook: History Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        320,
        1072
      ]
    },
    {
      "id": "16c4e99c-fc86-4cdf-9e8c-8589e68125e0",
      "name": "Get History from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        544,
        1072
      ]
    },
    {
      "id": "d03f826e-bb96-4dc8-9ee9-593c76513102",
      "name": "Create Time Series Query",
      "type": "n8n-nodes-base.code",
      "position": [
        768,
        1072
      ]
    },
    {
      "id": "87887a97-3202-4b5a-952e-22e102aea84d",
      "name": "Generate History Graph",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        992,
        1072
      ]
    },
    {
      "id": "97e9edfc-b6f0-4e20-98de-925f9f1e7e63",
      "name": "AI: Analyze Mood to Numbers",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        768,
        640
      ]
    },
    {
      "id": "e2f0fb66-caca-499a-a5dd-1f9bea436793",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        768,
        800
      ]
    },
    {
      "id": "ef72599f-e8fa-4961-8818-bffcd9917f39",
      "name": "AI: Generate Feedback",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1792,
        736
      ]
    },
    {
      "id": "d243908b-cd0c-4a8f-bb1e-a2ddbdc5e8f3",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1792,
        896
      ]
    },
    {
      "id": "182df94f-42ac-4394-9d1d-1b75d78677dc",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        320,
        640
      ]
    },
    {
      "id": "7a14d6b7-9439-4d85-b845-1948763f93e9",
      "name": "Set Test Data",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        640
      ]
    },
    {
      "id": "efdcd499-5e33-4bed-8622-6228664c0c8b",
      "name": "Mood Graph Studio",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 1040,
        "height": 592,
        "content": "## Track and Visualize Daily Moods\nThis workflow analyzes your daily mood using OpenAI, visualizes it with Wolfram Alpha, and logs everything to Google Sheets. It also includes a feature to retrieve a"
      }
    },
    {
      "id": "ea201318-01da-4775-939f-bff6c9a797b8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        832
      ],
      "parameters": {
        "width": 336,
        "height": 176,
        "content": "## 1. How to Start\nFor testing, edit `Set Test Data` and hit 'Execute Workflow'. For real use, send a POST request to the `/mood` webhook. The workflow is smart enough to handle both!"
      }
    },
    {
      "id": "9344e177-639f-4fcf-badc-105ccf826bdc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        464
      ],
      "parameters": {
        "width": 352,
        "height": 176,
        "content": "## 2. Analyze & Prep\nHere's where the magic starts. An AI quantifies your mood into scores. We then parse the response and gather all the data needed, like your `userId` and a timestamp."
      }
    },
    {
      "id": "34122569-d531-461d-a7a0-e73e884d6bf0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        464
      ],
      "parameters": {
        "width": 336,
        "height": null,
        "content": "## 3. Generate Output\nA second AI writes you an encouraging message. At the same time, we build a query and send it to Wolfram Alpha, which returns your cool new mood graph."
      }
    },
    {
      "id": "41ddc8ed-166e-412c-95a0-242349fb1dab",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2352,
        480
      ],
      "parameters": {
        "width": 352,
        "height": 176,
        "content": "## 4. Log & Respond\nTime to save our work. We log the complete record to your Google Sheet. If you used the webhook, we also send a JSON response back with all the analysis and a link to your graph."
      }
    },
    {
      "id": "0bcdfdfc-9df3-4fe0-87a0-2630a42452ac",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        1264
      ],
      "parameters": {
        "width": 352,
        "height": 208,
        "content": "## 5. History Graph Flow\nThis separate flow looks back at your mood history. Triggered by a POST request to `/history`, it fetches your data, builds a query, and posts a time-series graph to Slack."
      }
    },
    {
      "id": "5a2bdb8b-6a75-4b44-acd8-8152c0efd00e",
      "name": "Upload a file",
      "type": "n8n-nodes-base.slack",
      "position": [
        1200,
        1072
      ]
    }
  ],
  "connections": {
    "Set Test Data": {
      "main": [
        [
          {
            "node": "AI: Analyze Mood to Numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Test Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Analyze Mood to Numbers",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Prepare Data Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Generate Feedback",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Mood Graph": {
      "main": [
        [
          {
            "node": "Log Mood to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Data Fields": {
      "main": [
        [
          {
            "node": "Create Wolfram Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Mood Input": {
      "main": [
        [
          {
            "node": "AI: Analyze Mood to Numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Wolfram Query": {
      "main": [
        [
          {
            "node": "AI: Generate Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Feedback": {
      "main": [
        [
          {
            "node": "Generate Mood Graph",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate History Graph": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get History from Sheet": {
      "main": [
        [
          {
            "node": "Create Time Series Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Time Series Query": {
      "main": [
        [
          {
            "node": "Generate History Graph",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Mood to Google Sheet": {
      "main": [
        [
          {
            "node": "Return API Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: History Request": {
      "main": [
        [
          {
            "node": "Get History from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Analyze Mood to Numbers": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}