{
  "name": "Food Photo Analysis to Restaurant & Book Recommendations with GPT Vision and Google APIs",
  "nodes": [
    {
      "id": "1269407f-2761-4611-af3c-d61e9fbeb614",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        1680,
        800
      ]
    },
    {
      "id": "d804b5e1-f574-4c81-8c57-f9de592df449",
      "name": "Dish Classifier",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2128,
        800
      ]
    },
    {
      "id": "d1f36934-6055-4c93-9396-fb7ef3377ddb",
      "name": "Fetch Image (Drive)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1904,
        800
      ]
    },
    {
      "id": "0ed6a504-a545-4bc2-a10b-902d8d21d299",
      "name": "LLM (Vision/JSON)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2208,
        1024
      ]
    },
    {
      "id": "6862ca06-be98-4a63-899b-b94f02969447",
      "name": "Normalize Classification",
      "type": "n8n-nodes-base.code",
      "position": [
        2480,
        800
      ]
    },
    {
      "id": "8e43608e-0602-4cea-bab8-72e66251df8f",
      "name": "Set Origin & Radius",
      "type": "n8n-nodes-base.set",
      "position": [
        2704,
        800
      ]
    },
    {
      "id": "985089c9-6a40-41b4-a344-6442de7c2d20",
      "name": "Search Google Places",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3152,
        800
      ]
    },
    {
      "id": "e42be32f-f334-4570-9de1-12efe2b94024",
      "name": "Summarize Place List",
      "type": "n8n-nodes-base.code",
      "position": [
        3376,
        800
      ]
    },
    {
      "id": "98a9cba5-0d79-4641-ac49-a4e2cdfd5a8f",
      "name": "LLM (Selection)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        3680,
        1024
      ]
    },
    {
      "id": "7c8508b1-cede-451b-9844-04e7106e2d8c",
      "name": "Select Best Place (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3600,
        800
      ]
    },
    {
      "id": "c5c9a61e-d894-40ff-aba1-13d86f9af726",
      "name": "Format Best Place JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        3952,
        800
      ]
    },
    {
      "id": "f721cd9f-30eb-4fc7-8810-2d02291ace90",
      "name": "LLM (Books)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        4256,
        1024
      ]
    },
    {
      "id": "99be8853-41de-44ed-8596-657a0a8fedac",
      "name": "Recommend Book (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4176,
        800
      ]
    },
    {
      "id": "b22512e2-07f1-4b25-89b0-2026305f2341",
      "name": "Normalize Book JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        4528,
        800
      ]
    },
    {
      "id": "9af6fc3d-aabd-4f02-aa94-a96491125968",
      "name": "Search Google Books",
      "type": "n8n-nodes-base.googleBooks",
      "position": [
        4752,
        800
      ]
    },
    {
      "id": "41f90290-f831-43b5-ac26-d1159611763f",
      "name": "Format Book Details",
      "type": "n8n-nodes-base.code",
      "position": [
        4976,
        800
      ]
    },
    {
      "id": "26c9dce5-bda6-4a5e-b474-fe1148ac73f1",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        5200,
        800
      ]
    },
    {
      "id": "4b6256c4-9c26-4d24-abee-0d7800b121c6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        592
      ],
      "parameters": {
        "width": 560,
        "height": 960,
        "content": "## AI Recommender: From Food Photo to Restaurant and Book (Google Books Integrated)\n## What it does\n\nAnalyzes a food photo with an AI vision model to extract dish name + category\n\nSearches nearby rest"
      }
    },
    {
      "id": "0f73fbe4-f430-446e-b5a0-3ed56c6a04a3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        512
      ],
      "parameters": {
        "width": 448,
        "height": 512,
        "content": "## 🧩 Setup & Credentials\n\nConnect these **before running** the workflow:\n\n- **Google Drive Trigger** → Drive OAuth  \n- **Search Google Places** → Move API key to a Credential (don’t hardcode in header"
      }
    },
    {
      "id": "f9164e78-b671-475b-9f3c-2538b9b230a4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        1168
      ],
      "parameters": {
        "width": 384,
        "height": 256,
        "content": "## Photo → Category\n\nFetch Image (Drive) – downloads the image\n\nDish Classifier – vision prompt; returns strict JSON\n\nNormalize Classification (Code) – parses JSON safely, maps category to Places-frie"
      }
    },
    {
      "id": "9e12b78c-2ed0-40d7-9ed2-8d25dda64d89",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2976,
        1056
      ],
      "parameters": {
        "width": 384,
        "height": 352,
        "content": "## Find & Select Restaurant\n\nSet Origin & Radius (Set) – coordinates/radius\n\nSearch Google Places (HTTP POST /v1/places:searchText) – gets top candidates\n\nSummarize Place List (Code) – flattens to rea"
      }
    },
    {
      "id": "dd635986-5749-40fc-b7a2-2f5217404339",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3904,
        1184
      ],
      "parameters": {
        "width": 336,
        "height": 304,
        "content": "## Book Recommendation\n\nRecommend Book (AI) – returns recommended_book.title/author + reason\n\nNormalize Book JSON (Code) – strips code fences, guarantees fields\n\nSearch Google Books – quoted title sea"
      }
    },
    {
      "id": "8b4f9ed3-0ba1-4d0d-ac50-665041345636",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4816,
        1040
      ],
      "parameters": {
        "width": 336,
        "height": 128,
        "content": "## Output\n\nPost to Slack – assembles dish/category + best place + book details"
      }
    },
    {
      "id": "3653a047-b561-46f0-a730-c1ebb026274a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5344,
        1056
      ],
      "parameters": {
        "width": 336,
        "height": 416,
        "content": "## Troubleshooting\n\nLLM returns prose, not JSON → tighten prompts; enable “specific output format”; add a Code node to parse & default missing fields\n\nWrong book results → ensure quoted title / intitl"
      }
    },
    {
      "id": "5e8d70ee-a1fc-4dc7-a0e6-be208c3c1b1d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5344,
        608
      ],
      "parameters": {
        "width": 336,
        "height": 416,
        "content": "## Security & Review Checklist\n\n✅ No hardcoded secrets in HTTP headers/body—store API keys in Credentials\n\n✅ Remove personal IDs (private Sheet IDs, channels) before publishing\n\n✅ Centralize user sett"
      }
    },
    {
      "id": "3f180369-5d9f-4802-bae0-4ac007ed6e0a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4880,
        368
      ],
      "parameters": {
        "width": 336,
        "height": 416,
        "content": "## Google Books & Slack Output (quality tips)\n\nImprove Books accuracy\n\nUse quoted title: searchQuery = \"={{ '\\\"' + $json.recommended_book.title + '\\\"' }}\"\n\nIf needed, add intitle:\"{{title}}\" or restri"
      }
    },
    {
      "id": "8d2c4e24-cfd8-4b0c-bf31-2e672196923b",
      "name": "Pass the API",
      "type": "n8n-nodes-base.set",
      "position": [
        2928,
        800
      ]
    }
  ],
  "connections": {
    "LLM (Books)": {
      "ai_languageModel": [
        [
          {
            "node": "Recommend Book (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pass the API": {
      "main": [
        [
          {
            "node": "Search Google Places",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dish Classifier": {
      "main": [
        [
          {
            "node": "Normalize Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM (Selection)": {
      "ai_languageModel": [
        [
          {
            "node": "Select Best Place (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "LLM (Vision/JSON)": {
      "ai_languageModel": [
        [
          {
            "node": "Dish Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Image (Drive)": {
      "main": [
        [
          {
            "node": "Dish Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Book Details": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Book JSON": {
      "main": [
        [
          {
            "node": "Search Google Books",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recommend Book (AI)": {
      "main": [
        [
          {
            "node": "Normalize Book JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Google Books": {
      "main": [
        [
          {
            "node": "Format Book Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Origin & Radius": {
      "main": [
        [
          {
            "node": "Pass the API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Fetch Image (Drive)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Google Places": {
      "main": [
        [
          {
            "node": "Summarize Place List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Place List": {
      "main": [
        [
          {
            "node": "Select Best Place (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Best Place JSON": {
      "main": [
        [
          {
            "node": "Recommend Book (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Best Place (AI)": {
      "main": [
        [
          {
            "node": "Format Best Place JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Classification": {
      "main": [
        [
          {
            "node": "Set Origin & Radius",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}