{
  "name": "Optimize SEO meta tags in Google Sheets with Google Gemini",
  "nodes": [
    {
      "id": "676dd82e-7ea8-4873-b2e7-07640d4800da",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -560,
        0
      ]
    },
    {
      "id": "a6264ba1-4d30-4367-a9e4-627bce36cb91",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        0
      ]
    },
    {
      "id": "9ba1fec2-59f4-4c11-b441-371476a9a7d9",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        960,
        0
      ]
    },
    {
      "id": "1ebdc3de-5bed-45ed-a9ff-031fb9d40b61",
      "name": "get-current-tags",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -320,
        0
      ]
    },
    {
      "id": "7a3e6334-3cfc-43b8-8df9-3385ba28c9cc",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -120,
        0
      ]
    },
    {
      "id": "87807836-f718-4cd6-a7e3-6752aa911ca8",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        380,
        160
      ]
    },
    {
      "id": "fae37716-98cb-4982-b011-4af2bf665d0a",
      "name": "update-tags",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        400,
        0
      ]
    },
    {
      "id": "149059c8-12e7-45f7-894e-864015ba88fd",
      "name": "format-code",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -180
      ]
    },
    {
      "id": "70d530f5-d776-4aa0-85c3-380c255cf24c",
      "name": "save-output",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        -180
      ]
    },
    {
      "id": "f596a9da-b212-4148-94d0-a53078e103e1",
      "name": "turn-into-table",
      "type": "n8n-nodes-base.code",
      "position": [
        760,
        0
      ]
    },
    {
      "id": "8fb3573b-8abf-45df-924b-9a08e612eb34",
      "name": "Sticky — Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -200
      ],
      "parameters": {
        "width": 420,
        "height": 320,
        "content": "## How it works\n- Reads rows from a connected Google Sheet\n- Processes each row using Google Gemini to shorten meta titles and descriptions\n- Ensures SEO constraints (≤ 60 chars for titles, ≤ 160 char"
      }
    },
    {
      "id": "346507ba-2ee2-4569-a089-7cf39119f749",
      "name": "Sticky — Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -200
      ],
      "parameters": {
        "width": 440,
        "height": 340,
        "content": "## Setup steps\n- Estimated setup time: 10–15 min\n- Google Sheets OAuth2 credentials\n- Google Gemini API key\n- Sheet columns: `row_index`, `meta_title`, `meta_description`\n- Output columns `meta_titleF"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "update-tags",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format-code": {
      "main": [
        [
          {
            "node": "save-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "update-tags": {
      "main": [
        [
          {
            "node": "turn-into-table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "format-code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "turn-into-table": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "get-current-tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get-current-tags": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "update-tags",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}