{
  "name": "Automate daily Hindu festival posts on X with Google Gemini and GPT-4o Mini 🤖",
  "nodes": [
    {
      "id": "72ba643f-c65e-419f-9617-ce3123727b81",
      "name": "Get Today's Date",
      "type": "n8n-nodes-base.code",
      "position": [
        -760,
        600
      ]
    },
    {
      "id": "5e5aa3f7-1485-4e75-9875-6589be7263b5",
      "name": "Fetch Data of Matched Date",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -460,
        600
      ]
    },
    {
      "id": "c80da083-075a-4829-8d97-c8ef94f0414e",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -820,
        -180
      ]
    },
    {
      "id": "c1dede48-8d86-42ff-966b-40cd0dcb345d",
      "name": "Generate Structured Data",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -220,
        -180
      ]
    },
    {
      "id": "32801a33-0b01-4efd-a7bc-32e75036c8ae",
      "name": "Structured Posts",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        60,
        840
      ]
    },
    {
      "id": "a3882aaa-6df4-44ba-a151-922af524ebd7",
      "name": "Generate Posts",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -160,
        600
      ]
    },
    {
      "id": "8d7215ac-e355-447d-9cfe-a649f8226f46",
      "name": "Select Best Post",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        280,
        600
      ]
    },
    {
      "id": "458e7c34-b3fb-47b4-95b3-2a02504a1196",
      "name": "Generator Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -200,
        840
      ]
    },
    {
      "id": "1aa2a4b6-c5f8-4554-bc7c-8e21a357afe2",
      "name": "Selector Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        240,
        840
      ]
    },
    {
      "id": "e0fbf542-5a15-4be9-94aa-2d5e43cbc642",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        520,
        840
      ]
    },
    {
      "id": "c0df5bf5-8db2-4b36-b459-aa1e7924eafa",
      "name": "Everyday Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1040,
        600
      ]
    },
    {
      "id": "6aa2c2d5-8c2c-44d1-b7b1-f05011014262",
      "name": "Generate Data",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -280,
        60
      ]
    },
    {
      "id": "e392fca2-13ab-4f1a-96a8-8719f9bdbfd9",
      "name": "Schema for Data",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        0,
        60
      ]
    },
    {
      "id": "0743bd85-ad04-4c44-a6a0-69aad433fdd7",
      "name": "Transform to add all Data at once",
      "type": "n8n-nodes-base.code",
      "position": [
        200,
        -180
      ]
    },
    {
      "id": "d79d0959-22b2-4f02-b8ec-b38bc637aa94",
      "name": "Add all Rows at once",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        540,
        -180
      ]
    },
    {
      "id": "cedfbf0a-9c3c-4323-b99e-50971f8795f8",
      "name": "Post to X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        760,
        600
      ]
    },
    {
      "id": "21d2fcc5-75ab-4333-a14d-151dd8d8f20e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1060,
        -280
      ],
      "parameters": {
        "width": 400,
        "height": 260,
        "content": "## 🟥 Execute workflow\nTrigger node to manually run the workflow on demand for quick testing or use."
      }
    },
    {
      "id": "6690b393-e9a5-4090-a0a9-a9dbd724fc92",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -340
      ],
      "parameters": {
        "width": 260,
        "height": 320,
        "content": "## 🟪 Get Festival Data\n- Makes a GET request to fetch festival data from a remote API. This acts as the external data source.\n\n- **[URL](https://r.jina.ai/https://www.calendarlabs.com/2025-hindu-calen"
      }
    },
    {
      "id": "f247e949-96d2-4d9f-b8e7-0b2d5e97500d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -380
      ],
      "parameters": {
        "width": 300,
        "height": 360,
        "content": "## 🔗 Generate Structured Data \nUses an AI model (OpenAI or Gemini) to structure raw festival data into a well-defined format for consistent downstream processing.\n\n"
      }
    },
    {
      "id": "7082b953-fdda-4d7b-b857-e52ef4c45e6d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -340
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "## 🟧 Transform Data\nJavaScript/Code node that reshapes structured output into the format required for Google Sheets (i.e., an array of rows)."
      }
    },
    {
      "id": "d883cd80-fc5d-4ae8-be4a-3b82e0efe296",
      "name": "Get Festival Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -500,
        -180
      ]
    },
    {
      "id": "b0b3cd42-d5f3-42fb-bcdd-551098a699a3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -340
      ],
      "parameters": {
        "width": 260,
        "height": 320,
        "content": "## 🟩 Feel Google Sheet\nAppends all transformed rows to a Google Sheet in one go. Efficient batch upload to keep data organized and update logs or reports."
      }
    },
    {
      "id": "95ccbbe9-84a2-47f1-b6f7-167c65786447",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1160,
        -460
      ],
      "parameters": {
        "width": 2020,
        "height": 680,
        "content": ""
      }
    },
    {
      "id": "020314f2-419f-4101-bc03-57a21feaa640",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        480
      ],
      "parameters": {
        "width": 360,
        "height": 260,
        "content": "## 🔁  Everyday Trigger\nSchedules the workflow to run automatically once every day to generate and publish a new post based on the date."
      }
    },
    {
      "id": "54f1ff32-4048-4110-9115-731fa5d78ce0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        480
      ],
      "parameters": {
        "width": 260,
        "height": 260,
        "content": "## 📆 Get Today's Date\nJavaScript code to fetch today's date."
      }
    },
    {
      "id": "ab656067-7aed-49dd-8d88-588d682fb894",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        460
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "## 🟩 Match Date\nReads a Google Sheet and filters the row(s) matching today’s date. Acts as the source of contextual data for the post."
      }
    },
    {
      "id": "c6552300-bb7e-46ee-b310-56ff0ac21ccb",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        460
      ],
      "parameters": {
        "width": 380,
        "height": 280,
        "content": "## 🧠 Generate Posts\nUses an AI model (e.g., Gemini or OpenAI) to generate multiple draft social media posts based on the matched row’s content."
      }
    },
    {
      "id": "a974a47e-c95a-46da-a869-dd81f68effbf",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        460
      ],
      "parameters": {
        "width": 420,
        "height": 280,
        "content": "## 🧠 Select Best Post\nUses a second AI model to evaluate and select the best-performing or most relevant post among the generated options.\n\n"
      }
    },
    {
      "id": "c115adcd-6424-4498-9fe3-8ad199caf376",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        460
      ],
      "parameters": {
        "width": 300,
        "height": 280,
        "content": "## 🐦 Post to X (Twitter)\nShares the chosen post directly to an X (formerly Twitter) account using the n8n X node."
      }
    },
    {
      "id": "2de18aee-64f8-4a63-a5df-af6579b7e4c0",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1400,
        380
      ],
      "parameters": {
        "width": 2640,
        "height": 640,
        "content": ""
      }
    }
  ],
  "connections": {
    "Generate Data": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Structured Data",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Posts": {
      "main": [
        [
          {
            "node": "Select Best Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Selector Model": {
      "ai_languageModel": [
        [
          {
            "node": "Select Best Post",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generator Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Posts",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schema for Data": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Structured Data",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Everyday Trigger": {
      "main": [
        [
          {
            "node": "Get Today's Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Date": {
      "main": [
        [
          {
            "node": "Fetch Data of Matched Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Best Post": {
      "main": [
        [
          {
            "node": "Post to X",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Posts": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Posts",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get Festival Data": {
      "main": [
        [
          {
            "node": "Generate Structured Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Structured Data": {
      "main": [
        [
          {
            "node": "Transform to add all Data at once",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Select Best Post",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Data of Matched Date": {
      "main": [
        [
          {
            "node": "Generate Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform to add all Data at once": {
      "main": [
        [
          {
            "node": "Add all Rows at once",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Festival Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}