{
  "name": "Automated water consumption tracker - stored in sheet and notify in Slack",
  "nodes": [
    {
      "id": "b717d887-4d4b-4f21-97a3-978fcde2c9f6",
      "name": "slack_action_payload",
      "type": "n8n-nodes-base.set",
      "position": [
        -1020,
        100
      ]
    },
    {
      "id": "046950ad-a40c-47d9-8dab-406bc6bf6e12",
      "name": "slack_action_drink_data",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        100
      ]
    },
    {
      "id": "f90ec31c-b63e-470c-84ba-9429539d6bf4",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        140,
        -800
      ]
    },
    {
      "id": "28fe1f82-a8d6-4a9a-9061-ec94a7344fa3",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1260,
        -800
      ]
    },
    {
      "id": "ef12fb27-4377-42be-b9bc-bdbaaaa4c754",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -840,
        -640
      ]
    },
    {
      "id": "e36862e2-912f-4e41-80b0-6f66cc8ba0ba",
      "name": "Google Sheets - Get Target",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1040,
        -820
      ]
    },
    {
      "id": "9809c9bd-51ff-4277-9f0f-5e1438c25fe8",
      "name": "Summarize",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -840,
        -500
      ]
    },
    {
      "id": "ca995a95-9c35-43e4-ab68-0f7aa44f99d1",
      "name": "combine data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -620,
        -800
      ]
    },
    {
      "id": "44da169c-a2da-427c-aa46-54082b27e94b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -200,
        -800
      ]
    },
    {
      "id": "bc85d85a-cee2-43ab-a434-b26c5cd69122",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -20,
        -640
      ]
    },
    {
      "id": "551c217e-9192-486e-ae9f-068bebd0792a",
      "name": "slack drink webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1200,
        100
      ]
    },
    {
      "id": "c000d036-7246-47a5-9001-ffc482c74371",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1340,
        -960
      ],
      "parameters": {
        "width": 1060,
        "height": 620,
        "content": "## Grab recent drink data\n"
      }
    },
    {
      "id": "fd4bdbf4-c2d0-497c-891e-2667a85fa2ad",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        -960
      ],
      "parameters": {
        "width": 360,
        "height": 500,
        "content": "If already drink recently. Delay the notification in 3x minutes randomly\n"
      }
    },
    {
      "id": "cd4b4928-a858-4f12-b294-51ba8a4484da",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -960
      ],
      "parameters": {
        "width": 580,
        "height": 360,
        "content": "## Send the slack notification with AI wording. Also have the drink water action buttons"
      }
    },
    {
      "id": "cc7c8459-a97d-4ee9-b97c-b4a95afecf5a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1340,
        -320
      ],
      "parameters": {
        "width": 1300,
        "height": 660,
        "content": "## When User interact the drink button. Record the drink value to sheet and send back the iOS health log water url to start the shortcut\n\n**Note for Shortcut:**\n\nThe shortcul url will be like `shortcu"
      }
    },
    {
      "id": "e8e388e0-dddc-4db2-b5fa-acb76d025580",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        -960
      ],
      "parameters": {
        "width": 340,
        "height": 240,
        "content": "## Created by darrell_tw_ \n\nAn engineer now focus on AI and Automation\n\n### contact me with following:\n[X](https://x.com/darrell_tw_)\n[Threads](https://www.threads.net/@darrell_tw_)\n[Instagram](https:"
      }
    },
    {
      "id": "32b098ea-a72f-4906-9a39-916afcf47dc8",
      "name": "Slack send drink notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        480,
        -800
      ]
    },
    {
      "id": "8f550d8f-b960-41df-8a3b-2443327d5892",
      "name": "Send to Slack with confirm",
      "type": "n8n-nodes-base.slack",
      "position": [
        -560,
        0
      ]
    },
    {
      "id": "3383574c-7c96-4332-9876-2e47ad21f3de",
      "name": "Edit Fields-Set progress",
      "type": "n8n-nodes-base.set",
      "position": [
        -420,
        -800
      ]
    },
    {
      "id": "67fa160d-0ea2-48c2-83b5-2f5f1b6a01b5",
      "name": "Google Sheets - log water value to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -560,
        180
      ]
    },
    {
      "id": "6d336f63-0016-46ae-b71f-2e1dfac06826",
      "name": "Google Sheets - Get Today Water Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1040,
        -640
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "combine data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Slack send drink notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "combine data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "combine data": {
      "main": [
        [
          {
            "node": "Edit Fields-Set progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Target",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Sheets - Get Today Water Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slack drink webhook": {
      "main": [
        [
          {
            "node": "slack_action_payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slack_action_payload": {
      "main": [
        [
          {
            "node": "slack_action_drink_data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slack_action_drink_data": {
      "main": [
        [
          {
            "node": "Google Sheets - log water value to sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send to Slack with confirm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields-Set progress": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Target": {
      "main": [
        [
          {
            "node": "combine data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Slack with confirm": {
      "main": [
        []
      ]
    },
    "Google Sheets - Get Today Water Log": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          },
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}