{
  "name": "iMessage food photo nutritional analysis with GPT-4 Vision & Memory Storage",
  "nodes": [
    {
      "id": "22f351db-4581-450b-a260-b50962f4f35a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        0
      ],
      "parameters": {
        "width": 880,
        "height": 1000,
        "content": "## Using the n8n HTTP Request Node to Send a Blooio.com Message\n\nFollow these steps to configure your existing HTTP Request node in n8n so you can send SMS or email via the Blooio.com API.\n\n---\n\n### 1"
      }
    },
    {
      "id": "334e086c-872b-4a75-8a33-aaec66ec3f02",
      "name": "Send Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        780
      ]
    },
    {
      "id": "d4df3023-17d3-44f1-bafd-1a70a370f98f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        980
      ],
      "parameters": {
        "width": 780,
        "height": 360,
        "content": "## Message Read Webhook:\n```\n{\n  \"type\": \"updated-message\",\n  \"message\": {\n    \"messageId\": \"218BCBB7-92E5-455B-AF47-380DB39ACD16\",\n    \"content\": \"Test\",\n    \"sender\": \"+11111111111\",\n    \"selfMessag"
      }
    },
    {
      "id": "9330aeee-82ed-4549-9927-c7802a809cd9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        380
      ],
      "parameters": {
        "width": 780,
        "height": 580,
        "content": "## Message Received Webhook:\n```\n{\n  \"type\": \"new-message\",\n  \"message\": {\n    \"messageId\": \"B525F710-521F-4D39-8C8F-A44BB737A3B6\",\n    \"content\": \"Attached the csv file for you\",\n    \"sender\": \"+1111"
      }
    },
    {
      "id": "b7a92947-9617-4639-8c1a-b80242bb3571",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -160,
        780
      ]
    },
    {
      "id": "79696185-e706-4c36-83c1-8f7294f5ec8b",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -160,
        960
      ]
    },
    {
      "id": "cc4c91c1-aacc-4a43-a530-5f902cb4274f",
      "name": "Postgres Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        -160,
        1120
      ]
    },
    {
      "id": "3860f4f4-1af7-4951-a52c-3d7c7f07cb9a",
      "name": "Receive Message (From Blooio)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1440,
        760
      ]
    },
    {
      "id": "40a29005-81ce-4fea-9572-230d27a79894",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        400
      ]
    },
    {
      "id": "7b06c8a8-c330-45bc-a3a1-5dd1353b8603",
      "name": "If has images, download them",
      "type": "n8n-nodes-base.if",
      "position": [
        -700,
        760
      ]
    },
    {
      "id": "e3bb4c52-b673-4d97-b9b5-e980349366ec",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        40,
        380
      ]
    },
    {
      "id": "f14e056e-2756-4ed9-8233-61fb4a86ee62",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -280,
        380
      ]
    },
    {
      "id": "4bd4284d-fafe-4aca-976e-c822a8170823",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        600,
        780
      ]
    },
    {
      "id": "274b2815-92bf-4a8a-bcd6-98fdb977dfa0",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        260,
        780
      ]
    },
    {
      "id": "ddc20f94-42a0-4227-ad11-afb0feb34db5",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        620,
        940
      ]
    },
    {
      "id": "21264d57-60f5-4594-b450-07662078b23e",
      "name": "Don't respond to yourself",
      "type": "n8n-nodes-base.if",
      "position": [
        -960,
        760
      ]
    },
    {
      "id": "a098d03a-a4af-4b9a-aac2-5f5b57fd30e0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        260
      ],
      "parameters": {
        "width": 980,
        "height": 400,
        "content": "## Image downloader \n"
      }
    },
    {
      "id": "4a009bbd-4457-4bc9-8a03-9de40736f931",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -700
      ],
      "parameters": {
        "width": 760,
        "height": 1040,
        "content": "## 🚀 Start Here: Blooio Nutrition Tracker Setup\n\nWelcome! Before this n8n workflow can analyze meal photos and send nutrition summaries via SMS or iMessage, follow these steps to get set up:\n\n---\n\n###"
      }
    },
    {
      "id": "eb88206b-19c3-41cb-a409-2b924c780852",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -700
      ],
      "parameters": {
        "width": 680,
        "height": 1040,
        "content": "![Description](https://i.imgur.com/bOPrv4H.png)\n"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Don't respond to yourself": {
      "main": [
        [
          {
            "node": "If has images, download them",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If has images, download them": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Message (From Blooio)": {
      "main": [
        [
          {
            "node": "Don't respond to yourself",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}