{
  "name": "Automated tweet generator & publisher with GPT-4, Discord, and Google Sheets",
  "nodes": [
    {
      "id": "ad01801d-b508-4bc9-bbd5-3927c199c2a6",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1620,
        820
      ]
    },
    {
      "id": "bae17025-e1ab-41c3-ae2e-c600cac67605",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1760,
        820
      ]
    },
    {
      "id": "182833e2-dbca-4f27-adb8-8e440f5aea53",
      "name": "Get_Brand_Brief",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1900,
        820
      ]
    },
    {
      "id": "5aaf4e5d-8448-4ab8-a447-056d08746003",
      "name": "Get_Content_Fedback",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        2060,
        820
      ]
    },
    {
      "id": "525bd859-2d75-4cc1-8589-b0b86916f8c6",
      "name": "AI Content creator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1800,
        560
      ]
    },
    {
      "id": "0a9670d5-81a4-447e-8e66-e2400ab90e5c",
      "name": "Discord confirm",
      "type": "n8n-nodes-base.discord",
      "position": [
        5680,
        520
      ]
    },
    {
      "id": "034438dd-a001-4a06-87c5-f2a803c7092c",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        4000,
        480
      ]
    },
    {
      "id": "0fe8cc50-a6a8-4c96-b6d0-b80af87c2bde",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        3860,
        680
      ]
    },
    {
      "id": "9afdf3aa-486d-4240-be87-1917140f696e",
      "name": "Get Brief",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        540,
        560
      ]
    },
    {
      "id": "bd92b0a5-445f-4144-b7ef-aeb0efbffe37",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1060,
        560
      ]
    },
    {
      "id": "884baeb8-5840-4e06-a93b-d2fd5164500a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        880,
        760
      ]
    },
    {
      "id": "5a64cbd2-ffd0-4699-b69c-032f49f821e0",
      "name": "Idea creator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        700,
        560
      ]
    },
    {
      "id": "7f959c08-0eb2-42a7-a736-04379cda4da7",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        160,
        540
      ]
    },
    {
      "id": "f35cad4a-ebc7-4957-81c7-79ffe4c875cc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        300
      ],
      "parameters": {
        "width": 880,
        "height": 760,
        "content": "# Idea creator\n## AI Agent who finds relevant ideas for posts on social media. He finds ideas with help of the brand brief.\n"
      }
    },
    {
      "id": "11bca216-111e-49a7-8bf1-5b5a7135a6d6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        300
      ],
      "parameters": {
        "width": 1000,
        "height": 760,
        "content": "# Content creator\n## Writes the first draft of a post based on the brand brief, with feedback on which post will fit best.\n"
      }
    },
    {
      "id": "b89b28e9-cbfb-45ab-b227-4d630bf72dcf",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2660,
        780
      ]
    },
    {
      "id": "c7fb63b2-aa90-4cd8-9967-bb117580aa56",
      "name": "Simple Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2820,
        780
      ]
    },
    {
      "id": "a19e6ecf-736a-4d04-94d3-d3f93f0e60e7",
      "name": "Check History",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        2240,
        820
      ]
    },
    {
      "id": "2cbeefd8-2276-42f7-8a43-0705d6482210",
      "name": "Check Examples",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        3120,
        780
      ]
    },
    {
      "id": "8f4b55ce-1124-442b-9eb4-d1cbeafe42f1",
      "name": "Rewriter",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2840,
        560
      ]
    },
    {
      "id": "79825dd7-874c-47ae-b106-c0baec9cd4ea",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        300
      ],
      "parameters": {
        "width": 900,
        "height": 780,
        "content": "# Rewriter\n## This agent rewrites posts to match your style using examples from a Google Sheet.\n"
      }
    },
    {
      "id": "3d59febf-dca4-47e7-8dfa-9d14c4efb8fa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3560,
        300
      ],
      "parameters": {
        "width": 840,
        "height": 780,
        "content": "# Additional approval\n## Sends the post for approval in a Discord server, or you can use Telgram—whichever you prefer. This step is optional.\n"
      }
    },
    {
      "id": "dab4e350-684d-44d4-8640-730938a7ee1e",
      "name": "Send post for approval",
      "type": "n8n-nodes-base.discord",
      "position": [
        3720,
        480
      ]
    },
    {
      "id": "cb3e9feb-4c39-4a1e-b666-d8830d1788f6",
      "name": "Try Again ",
      "type": "n8n-nodes-base.discord",
      "position": [
        3660,
        680
      ]
    },
    {
      "id": "dd1d7d66-52ea-4037-96e2-8fd156812e67",
      "name": "End of work",
      "type": "n8n-nodes-base.discord",
      "position": [
        3980,
        840
      ]
    },
    {
      "id": "dd50213b-9b50-4806-b690-d331991df4ce",
      "name": "Confirm of next try",
      "type": "n8n-nodes-base.discord",
      "position": [
        4220,
        680
      ]
    },
    {
      "id": "7d3f3496-0a0b-412f-b954-bad4190cb8a8",
      "name": "Post on X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        4700,
        600
      ]
    },
    {
      "id": "c9a69661-f7a7-472a-b68c-7f6b2f915374",
      "name": "Update history",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5240,
        640
      ]
    },
    {
      "id": "4f1ef715-9e77-4aef-8955-5d81f97d489d",
      "name": "Add post to examples",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5220,
        420
      ]
    },
    {
      "id": "62756c10-91f6-4748-a683-362b55b49948",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4520,
        300
      ],
      "parameters": {
        "width": 480,
        "height": 780,
        "content": "# Post On X(Twitter)"
      }
    },
    {
      "id": "13ced8cd-4128-41df-bd4a-ae2beaee7cb9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5080,
        300
      ],
      "parameters": {
        "width": 420,
        "height": 780,
        "content": "# Update History and Examples"
      }
    },
    {
      "id": "0dd893d3-7341-4d9a-81ad-09d3f9b2dee8",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5540,
        300
      ],
      "parameters": {
        "width": 360,
        "height": 780,
        "content": "# Confirm of End Workflow"
      }
    },
    {
      "id": "966a3c48-78dc-458a-8afb-cbf952943b53",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        960,
        1580
      ]
    },
    {
      "id": "36290365-e2d8-4ead-adf2-4382699a80b0",
      "name": "Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1180,
        1580
      ]
    },
    {
      "id": "63902c08-9bfd-4c78-94d9-fabb92d7b948",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1400,
        1580
      ]
    },
    {
      "id": "0739a1b3-6e20-4a01-9fd2-32e843d78695",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        1580
      ]
    },
    {
      "id": "6865e2f7-2099-456d-81f6-ab471c7ed44d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        1300
      ],
      "parameters": {
        "width": 1620,
        "height": 820,
        "content": "# Sub Workflow Get Brand Brief\n## Move to a separate workflow, add the trigger \"When Executed by Another Workflow\", and connect it to the main workflow \"AI Content Creator\".\n"
      }
    },
    {
      "id": "1971f2ca-55af-4e28-9af5-fdc00f5a0c80",
      "name": "Get brand brief",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        3200,
        1640
      ]
    },
    {
      "id": "7bca5b92-66cd-45ff-9fd4-377ad5055f6c",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3400,
        1640
      ]
    },
    {
      "id": "b1116a8f-457e-4227-8f6c-ccd6f84ef0d9",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        3780,
        1640
      ]
    },
    {
      "id": "5ec7bc40-fe22-423f-86e9-7701b4faf35e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2840,
        1320
      ],
      "parameters": {
        "width": 1660,
        "height": 800,
        "content": "# Sub Workflow Get Content Feedback\n## Move to a separate workflow, add the trigger \"When Executed by Another Workflow\", and connect it to the main workflow \"AI Content Creator\".\n"
      }
    },
    {
      "id": "be9bbe69-6543-4c3d-8cb2-235078fab28e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 6080,
        "height": 1200,
        "content": "# Main workflow"
      }
    },
    {
      "id": "6f224827-8c2b-4b78-9a9f-0ac024af5404",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        680,
        780
      ]
    },
    {
      "id": "907c004c-ea40-47de-a315-db88b2f44bd4",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4760,
        1280
      ],
      "parameters": {
        "width": 1220,
        "height": 1020,
        "content": "# ✅ AI X Post Creator – Quick Start Guide\n\nThis workflow automatically generates viral posts for your personal brand on X (Twitter).  \nIt creates a content idea based on your brand brief, writes a sho"
      }
    }
  ],
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Confirm of next try",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "End of work",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Post on X",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Try Again ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rewriter": {
      "main": [
        [
          {
            "node": "Send post for approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Brief": {
      "main": [
        [
          {
            "node": "Idea creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post on X": {
      "main": [
        [
          {
            "node": "Add post to examples",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Try Again ": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Content creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Idea creator": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check History": {
      "ai_tool": [
        [
          {
            "node": "AI Content creator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Content creator",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Check Examples": {
      "ai_tool": [
        [
          {
            "node": "Rewriter",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "Rewriter",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Update history": {
      "main": [
        [
          {
            "node": "Discord confirm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get brand brief": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get_Brand_Brief": {
      "ai_tool": [
        [
          {
            "node": "AI Content creator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Content creator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Content creator": {
      "main": [
        [
          {
            "node": "Rewriter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Rewriter",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Idea creator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Confirm of next try": {
      "main": [
        [
          {
            "node": "AI Content creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get_Content_Fedback": {
      "ai_tool": [
        [
          {
            "node": "AI Content creator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Add post to examples": {
      "main": [
        [
          {
            "node": "Update history",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send post for approval": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Idea creator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}