{
  "name": "Automate Twitter posting with GPT-4 content generation & Google Sheets tracking",
  "nodes": [
    {
      "id": "185ffe75-df92-4137-a4a2-985e9d4c4359",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        640,
        832
      ]
    },
    {
      "id": "fc8d5d4f-bb1b-4645-8301-d9f08f2d00a6",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        400,
        1248
      ]
    },
    {
      "id": "a768abfb-aa5a-4363-b942-eee38f5deeff",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        736,
        1728
      ]
    },
    {
      "id": "68527ad0-d27f-42aa-bf28-36a8e4f86b84",
      "name": "Create Tweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        2256,
        992
      ]
    },
    {
      "id": "0efc1811-933f-4765-838d-48d48c4e231d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        1168
      ],
      "parameters": {
        "width": 464,
        "height": 272,
        "content": "### Step 1: Scheduler Trigger  \nThis node acts as the workflow’s timer ⏱️.  \nIt is configured to automatically trigger the workflow every **6 hours**, ensuring that new tweet content is generated and "
      }
    },
    {
      "id": "1f98869b-5a49-4e0b-97c2-beac42127f00",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        672
      ],
      "parameters": {
        "width": 560,
        "height": 352,
        "content": "### Step 2: AI Agent Node  \nThis node acts as the **content brain 🧠** of the workflow.  \nIt uses a carefully designed prompt to control the tweet generation process, ensuring that each post is relevan"
      }
    },
    {
      "id": "c855336e-907a-4d16-bcb1-d3f40d355ba9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        1216
      ],
      "parameters": {
        "width": 384,
        "height": 368,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n### Step 2.1: AI Agent Node  \nThis node acts as the **content brain 🧠** of the workflow.  \nIt uses a carefully designed prompt to control the tweet generation process, ensuring that each "
      }
    },
    {
      "id": "44a5383e-df8d-4e20-8c5e-413d31a74bce",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        1712
      ],
      "parameters": {
        "width": 464,
        "height": 304,
        "content": "\n\n\n\n\n\n\n\n\n\n### Step 2.2: Simple Memory Node  \nThis node acts as a **context store 🧠**, holding the conversation history and relevant details passed from the AI Agent and Chat Model.  \nIt ensures contin"
      }
    },
    {
      "id": "43269c90-3691-48dc-8c3a-aea53349206b",
      "name": "Get Data from Google Sheet",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        1120,
        1248
      ]
    },
    {
      "id": "dcf857b1-9cf0-42aa-8b5c-651d6cc97118",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        1232
      ],
      "parameters": {
        "width": 496,
        "height": 304,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n### Step 2.3: Get Rows from Google Sheet Node  \nThis node retrieves the list of **already published tweets 📑** from a connected Google Sheet.  \nBy keeping track of past posts, it ensures "
      }
    },
    {
      "id": "410b5cb5-b4fb-4c00-9d06-464860334a43",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1616,
        1232
      ]
    },
    {
      "id": "ea5b0b4f-a8f2-41fb-9fa7-d11d89f8b9c1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        1040
      ],
      "parameters": {
        "width": 400,
        "height": 352,
        "content": "### Step 3: Code Node  \nThis node parses the **raw string response 📝** generated by the AI model into a clean, structured **JSON format**.  \nBy converting the response into executable JSON, it ensures"
      }
    },
    {
      "id": "190e5bfe-99e6-4dbf-abc2-a56e633ef4a3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        816
      ],
      "parameters": {
        "width": 432,
        "height": 352,
        "content": "### Step 4: X Create Tweet Node  \nThis node publishes the final tweet 🐦 generated by the AI directly to **X (Twitter)**.  \nIt ensures that the content parsed and validated in earlier steps is posted a"
      }
    },
    {
      "id": "44d53ba9-ffdc-44dd-9414-65149f2b2449",
      "name": "Add new Tweet to Google sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3024,
        1200
      ]
    },
    {
      "id": "95ba4418-c676-425d-bdee-a756f1422bea",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2816,
        960
      ],
      "parameters": {
        "width": 496,
        "height": 432,
        "content": "### Step 5: Add New Tweet to Google Sheet Node  \nThis node logs each newly published tweet into the connected **Google Sheet**.  \nIt records both the **tweet content** and its **status** (marked as *P"
      }
    },
    {
      "id": "e9779654-a51b-4c71-b356-9fd7e7d08ea4",
      "name": "Start Workflow",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -96,
        1312
      ]
    },
    {
      "id": "28fca0ca-9c2d-4b14-9c50-4b533bc7fac9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        592
      ],
      "parameters": {
        "width": 528,
        "height": 432,
        "content": "### Prerequisites  \n\n#### Google Sheets  \n- Connect your Google credentials with **Google Sheets** and **Google Drive** services enabled.  \n- Create a Google Sheet with the following column headers:  "
      }
    },
    {
      "id": "7d1f8ed7-e600-482f-b4b2-bae71fd337c2",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        1584
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "## Need Help? \n\nWe develop tailored workflow to save youe valuable time. Should you have any questions or wish to explore more custom automation solutions, we would be happy to connect\n\n\n### Email: ge"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Tweet": {
      "main": [
        [
          {
            "node": "Add new Tweet to Google sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Start Workflow": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Data from Google Sheet": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}