{
  "name": "Get daily exercise plan with Flex Message via LINE",
  "nodes": [
    {
      "id": "2afc390e-d774-4db4-a52f-138f13837646",
      "name": "Azure OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1040,
        0
      ]
    },
    {
      "id": "529d9ed9-3ae5-41cb-983e-874aa37ee1c7",
      "name": "YogaLog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2240,
        -100
      ]
    },
    {
      "id": "d491b5c3-31ab-49b2-abc3-8c2a67cf9571",
      "name": "Azure OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        2360,
        120
      ]
    },
    {
      "id": "3b1ebdcb-9e6b-437c-8f51-944218c0c276",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        2520,
        80
      ]
    },
    {
      "id": "3fc67522-501c-4e43-bf9d-b367d57ad4f9",
      "name": "Azure OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        2540,
        120
      ]
    },
    {
      "id": "19bd208b-a5c5-47b3-a2cc-e92a71444be7",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2640,
        220
      ]
    },
    {
      "id": "2bf3f3d3-84c7-4fd4-b1b9-8c0fb7df44b1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2400,
        -60
      ]
    },
    {
      "id": "fa3fc89e-54d8-4706-af59-72dbd80fbef4",
      "name": "PosesDatabase1",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        2480,
        220
      ]
    },
    {
      "id": "ff7bd540-c89b-43d1-bb07-bb060a6b4ba6",
      "name": "YogaLog2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2980,
        20
      ]
    },
    {
      "id": "f649c5b9-fad1-412c-8389-ed53b95e5583",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2740,
        -120
      ]
    },
    {
      "id": "8194e695-fa9e-4555-9da5-b7dbdc1b0e4a",
      "name": "Trigger 2130 YogaPosesToday",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -200,
        -20
      ]
    },
    {
      "id": "3b5706d8-4968-4b9c-a255-7d1f806d85dc",
      "name": "Azure OpenAI Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1340,
        180
      ]
    },
    {
      "id": "acee6e43-f094-4f30-bffb-6c56b0425327",
      "name": "Get PoseName",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        -20
      ]
    },
    {
      "id": "6be3a88c-4e0f-44e6-97c1-eafa13230ae7",
      "name": "WritePosesToday",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1120,
        -160
      ]
    },
    {
      "id": "8d9cdf4c-a432-44ff-a0a3-133fbc8e9daa",
      "name": "RewritePosesToday",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1180,
        60
      ]
    },
    {
      "id": "2e419654-1f83-48df-8ac0-9ec621444cc2",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        480,
        100
      ]
    },
    {
      "id": "ad1bf966-114e-4bb8-abff-f5768e907aff",
      "name": "WriteJSONflex",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        580,
        -80
      ]
    },
    {
      "id": "1e6af9e5-675d-4d9a-aba6-304d218ea138",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        780,
        220
      ]
    },
    {
      "id": "5559c5b9-6c2c-4adb-9544-79be3f1f85d1",
      "name": "Auto-fixing Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        680,
        80
      ]
    },
    {
      "id": "2335f74e-3fe6-4720-bb88-1bbda320ae8b",
      "name": "Azure OpenAI Chat Model6",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        640,
        200
      ]
    },
    {
      "id": "83d02971-bdf6-4c45-b705-f2f49fa49525",
      "name": "Azure OpenAI Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1780,
        200
      ]
    },
    {
      "id": "5e5c1c11-cf3d-47f4-91ce-14d7e3f493fb",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        -20
      ]
    },
    {
      "id": "864e2fbb-a9dc-43ba-918e-0197821de598",
      "name": "Line Push with Flex Bubble",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1980,
        -80
      ]
    },
    {
      "id": "91e50734-8899-4d23-9a4f-ce637d9e5ed1",
      "name": "CombineAll",
      "type": "n8n-nodes-base.set",
      "position": [
        1640,
        -100
      ]
    },
    {
      "id": "dc6d5dfe-66ad-49ca-b246-ee52f270269d",
      "name": "Fix JSON",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1720,
        120
      ]
    },
    {
      "id": "a062cf06-f438-4d1e-9c0c-d2fc00f40071",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -380
      ],
      "parameters": {
        "width": 260,
        "height": 240,
        "content": "## YogiAI\n\nThis YogiAI is to provide daily reminder and pose of the day to the user via Line Push Message\n\nThe data will be generated from GoogleSheet Weighted Random Poses and Push to your Line at th"
      }
    },
    {
      "id": "8d2184a9-af30-4b1e-826b-69a8f37d8256",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -320
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## Get the Data\nThis is to get the data from GoogleSheet \n\nIn the range we got, we'll have PosesName, uri (image link), and url (link when clicked) \n\nThe sample is here \nhttps://docs.google.com/spread"
      }
    },
    {
      "id": "6d688a1c-90aa-4c3a-a868-946c61cec7cf",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -320
      ],
      "parameters": {
        "width": 540,
        "height": 660,
        "content": "## Write FlexMessage for Images\n\nTo send the information in Line, we need to write a JSON for Flex Message meaning that it can slides to show the images of the pose\n\nWe use auto-parser here to make su"
      }
    },
    {
      "id": "e5b92f32-e282-49cd-8084-68e380572ee9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -320
      ],
      "parameters": {
        "width": 540,
        "height": 660,
        "content": "## Write Text for Poses today \n\nThis node we want to have user friendly text such as with emojis, etc. So, we give Azure OpenAI the poses of today and ask it to rewrie"
      }
    },
    {
      "id": "38cc9d2f-be2c-4448-9746-5d533108df7c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -320
      ],
      "parameters": {
        "width": 540,
        "height": 660,
        "content": "## Combine the result and push it via Line\n\n1) We used 'Edit Field' to combine all the output\n(Hint: you can have input_txt and output_txt to debug your script here)\n2) To make sure that our JSON is p"
      }
    },
    {
      "id": "b88d6f78-ce54-4b83-b009-e4e22e518c7c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2200,
        -320
      ],
      "parameters": {
        "width": 1020,
        "height": 660,
        "content": "## Write back the data into Log and Log2 \n\nWe used log2 to count how many time we send each poses and weighted this back into the 'Yoga' Sheet to make the random more random ;)\n\nTo put the data back, "
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "WriteJSONflex",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YogaLog": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix JSON": {
      "main": [
        [
          {
            "node": "Line Push with Flex Bubble",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YogaLog2": {
      "main": [
        []
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "YogaLog2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CombineAll": {
      "main": [
        [
          {
            "node": "Fix JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get PoseName": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WriteJSONflex": {
      "main": [
        [
          {
            "node": "WritePosesToday",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PosesDatabase1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "WritePosesToday": {
      "main": [
        [
          {
            "node": "RewritePosesToday",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RewritePosesToday": {
      "main": [
        [
          {
            "node": "CombineAll",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "WriteJSONflex",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "WritePosesToday",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Fix JSON",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "RewritePosesToday",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "WriteJSONflex",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Line Push with Flex Bubble": {
      "main": [
        [
          {
            "node": "YogaLog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger 2130 YogaPosesToday": {
      "main": [
        [
          {
            "node": "Get PoseName",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}