{
  "name": "Analyze hotel reviews with OpenAI GPT-4o-mini and Airtable sentiment fields",
  "nodes": [
    {
      "id": "f509e16f-5290-44a3-91f5-bc56c9fbabae",
      "name": "Analyze Review Sentiment",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -256,
        384
      ]
    },
    {
      "id": "809d1662-1de1-4e5f-b7f2-d3e3f6ee0311",
      "name": "AI: Analyze Review Sentiment",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -176,
        192
      ]
    },
    {
      "id": "9ff408ac-3bb6-4121-a4ec-ebd03699a269",
      "name": "Combine AI Output with Review Data",
      "type": "n8n-nodes-base.set",
      "position": [
        432,
        192
      ]
    },
    {
      "id": "fc1d370e-3fb1-46b9-a2e4-ac892288d0ec",
      "name": "Airtable Trigger",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        -880,
        176
      ]
    },
    {
      "id": "5e8f1399-052a-4277-9c7d-90b51e03d760",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -32
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1887ae27-59f0-458e-ae3d-87d592135774",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        16
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7bd845cf-25a5-4fca-ae27-f4bf0ca2f989",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        16
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4abe5104-68e0-45c8-9290-ceae8e87fe14",
      "name": "Processed Review: No Action Required",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -496,
        80
      ]
    },
    {
      "id": "e70c0e99-5001-46d8-a8de-7b103bf4f063",
      "name": "Normalize Review Payload",
      "type": "n8n-nodes-base.set",
      "position": [
        -480,
        288
      ]
    },
    {
      "id": "00ec9666-837a-480b-a643-a909aa79b808",
      "name": "Check AI Output Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        192
      ]
    },
    {
      "id": "e1683eb4-bd75-454e-b8a7-9625f0f7a0ac",
      "name": "AI Failure Handler",
      "type": "n8n-nodes-base.set",
      "position": [
        928,
        352
      ]
    },
    {
      "id": "44181195-5391-4aea-bcde-6a51376624c9",
      "name": "Parse AI Output (JSON Schema)",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        16,
        384
      ]
    },
    {
      "id": "ed537ecc-6f68-4f60-ab0f-1a3551d73ae3",
      "name": "Prepare Airtable Update",
      "type": "n8n-nodes-base.set",
      "position": [
        944,
        144
      ]
    },
    {
      "id": "7cf023b3-cd91-48d2-82bb-0f44442d9cd4",
      "name": "Update Airtable Review Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1264,
        224
      ]
    },
    {
      "id": "89b3e0f1-3c55-4425-808d-001cb7abcf5f",
      "name": "Flatten AI Output",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        192
      ]
    },
    {
      "id": "99806ca8-b679-4734-a9dc-9b8c72fd5649",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        16
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0a4eb3f3-fdb2-4cbd-9020-b21356639f01",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -32
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bb749deb-6cd2-4929-913e-f58dcb793951",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        32
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "dc2fcd77-75f3-413f-84d1-51ca819f400c",
      "name": "Check if Review Exist",
      "type": "n8n-nodes-base.if",
      "position": [
        -768,
        496
      ]
    },
    {
      "id": "45e4a469-12d8-4946-b798-8a44bc559765",
      "name": "Check if Processed",
      "type": "n8n-nodes-base.if",
      "position": [
        -704,
        176
      ]
    },
    {
      "id": "22b16eaa-8694-4dfc-809e-167fd7b24208",
      "name": "No Review to Process",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -512,
        544
      ]
    }
  ],
  "connections": {
    "Airtable Trigger": {
      "main": [
        [
          {
            "node": "Check if Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flatten AI Output": {
      "main": [
        [
          {
            "node": "Combine AI Output with Review Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Failure Handler": {
      "main": [
        [
          {
            "node": "Update Airtable Review Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Processed": {
      "main": [
        [
          {
            "node": "Processed Review: No Action Required",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check if Review Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check AI Output Valid": {
      "main": [
        [
          {
            "node": "Prepare Airtable Update",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Failure Handler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Review Exist": {
      "main": [
        [
          {
            "node": "Normalize Review Payload",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Review to Process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Airtable Update": {
      "main": [
        [
          {
            "node": "Update Airtable Review Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Review Sentiment": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Analyze Review Sentiment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Review Payload": {
      "main": [
        [
          {
            "node": "AI: Analyze Review Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Analyze Review Sentiment": {
      "main": [
        [
          {
            "node": "Flatten AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Output (JSON Schema)": {
      "ai_outputParser": [
        [
          {
            "node": "AI: Analyze Review Sentiment",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Update Airtable Review Record": {
      "main": [
        []
      ]
    },
    "Combine AI Output with Review Data": {
      "main": [
        [
          {
            "node": "Check AI Output Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}