{
  "name": "Create content from form inputs and save it to Google Drive using AI",
  "nodes": [
    {
      "id": "11abe711-000c-4960-9f07-4e124532ba83",
      "name": "create_folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        20,
        440
      ]
    },
    {
      "id": "8198bcdb-3082-43d8-84aa-77e292b56e05",
      "name": "input_brief",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        440
      ]
    },
    {
      "id": "9b2be845-91c5-4fa8-9007-c0cee4058ddd",
      "name": "new_lines",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        440
      ]
    },
    {
      "id": "e5228041-32e7-4834-9d87-6b7152bf97e3",
      "name": "input_sections",
      "type": "n8n-nodes-base.set",
      "position": [
        1980,
        480
      ]
    },
    {
      "id": "4b7020ae-d38e-437c-871e-02f78012f691",
      "name": "section_text",
      "type": "n8n-nodes-base.set",
      "position": [
        2540,
        480
      ]
    },
    {
      "id": "599af95b-391c-4d57-868d-0db6eaa39da1",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        3660,
        480
      ]
    },
    {
      "id": "0aa60c0b-0537-4539-8312-0be3cfa6c4de",
      "name": "Sort",
      "type": "n8n-nodes-base.sort",
      "position": [
        3880,
        480
      ]
    },
    {
      "id": "f19ef511-bf86-4c4c-9adf-731704bf64ae",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4500,
        360
      ]
    },
    {
      "id": "568fd895-fce6-4af8-89de-26e51ae5a66d",
      "name": "final_article",
      "type": "n8n-nodes-base.set",
      "position": [
        4700,
        360
      ]
    },
    {
      "id": "771f197a-02e1-4809-9505-e1a3900581f0",
      "name": "set_introduction",
      "type": "n8n-nodes-base.set",
      "position": [
        1980,
        300
      ]
    },
    {
      "id": "3ad780e5-1dcd-43f0-816c-e6f2608461d5",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        4280,
        320
      ]
    },
    {
      "id": "1902e5e3-10c2-49e8-8da1-9d1cd6ae681c",
      "name": "receive_topic",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -580,
        440
      ]
    },
    {
      "id": "af8d14aa-d095-4bce-a525-8427e0f450e2",
      "name": "add_row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -380,
        440
      ]
    },
    {
      "id": "3f240ed3-9eff-4ae1-91ec-689a96f1c97e",
      "name": "topic_variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        440
      ]
    },
    {
      "id": "d4715acb-0f04-45e2-a476-32cec57a840a",
      "name": "markdown_to_file",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        600,
        440
      ]
    },
    {
      "id": "58db0daf-09cb-420d-a0a0-1fac4f2d97ea",
      "name": "split_out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1480,
        440
      ]
    },
    {
      "id": "02ed3e37-038e-497d-83af-e8f720b3811d",
      "name": "section_starts_with_#",
      "type": "n8n-nodes-base.if",
      "position": [
        1700,
        440
      ]
    },
    {
      "id": "b3b0138a-ca44-411e-8ecd-7a951fe22919",
      "name": "25_percent_chance",
      "type": "n8n-nodes-base.if",
      "position": [
        2760,
        480
      ]
    },
    {
      "id": "70015edc-babc-4123-9589-ac4c70345fa7",
      "name": "set_section_content",
      "type": "n8n-nodes-base.set",
      "position": [
        3400,
        420
      ]
    },
    {
      "id": "e413900a-dc61-4150-93ac-308032ec4aed",
      "name": "add_2_new_lines",
      "type": "n8n-nodes-base.code",
      "position": [
        4100,
        480
      ]
    },
    {
      "id": "25110a53-8627-4598-bc11-f2217856e10d",
      "name": "final_article_file",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        4940,
        360
      ]
    },
    {
      "id": "0122e867-252d-4e54-8576-5bd3ddc7a464",
      "name": "upload_fiinalArticle",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        5160,
        360
      ]
    },
    {
      "id": "e4fa62e3-6c05-4e99-a53e-ede197e2ca02",
      "name": "update_article_link",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5380,
        360
      ]
    },
    {
      "id": "578cc443-0261-401c-a948-44f69773cfd7",
      "name": "upload_outline_file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        820,
        440
      ]
    },
    {
      "id": "d1e70bea-ea88-4b02-9516-ea791b569cd8",
      "name": "section_paragraphs",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2180,
        480
      ]
    },
    {
      "id": "87cf609d-682d-4e17-a1a4-185908a2411c",
      "name": "change_section_format",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3020,
        420
      ]
    },
    {
      "id": "eecf903b-3d60-4c6e-9972-78803e34682a",
      "name": "create_outline",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        220,
        440
      ]
    },
    {
      "id": "202dfc30-15c9-4a60-b281-33a4f0fad97e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1240,
        280
      ],
      "parameters": {
        "width": 626.3622313971345,
        "height": 534.5136001658811,
        "content": "## Overview\n### This workflow automates the generation of high-quality content using AI and integrates with tools like Google Drive and Google Sheets for content management and organization.\n\n## Key F"
      }
    },
    {
      "id": "397a506f-2a58-4cb1-a181-cf32b2d4a936",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        300
      ],
      "parameters": {
        "width": 522.4076473360327,
        "height": 269.1338026993484,
        "content": "- ### Captures user inputs like title, word count, keywords, and additional instructions for content generation. This is the starting point of the workflow\n\n- ### Parses form inputs into variables for"
      }
    },
    {
      "id": "deac2389-35af-4acc-9904-df539fff603f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        320
      ],
      "parameters": {
        "width": 152.8844206522747,
        "height": 245.20095123019289,
        "content": "### Creates a folder in Google Drive to store the generated content and outline"
      }
    },
    {
      "id": "371fdd93-437c-456b-95a1-f14d0334595e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        340
      ],
      "parameters": {
        "width": 263.93285146915525,
        "height": 203.07913264447978,
        "content": "### Sends user inputs to an AI model to generate a detailed content outline in Markdown format.\"\n"
      }
    },
    {
      "id": "3f9c4cd6-c384-47da-ab90-4e87696da121",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        380
      ],
      "parameters": {
        "width": 376.89591040356845,
        "height": 193.50599205681746,
        "content": "### Uploads the AI-generated outline to the Google Drive folder created earlier."
      }
    },
    {
      "id": "50ce135a-8fb6-4486-be7c-7ba0d066e6a2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        380
      ],
      "parameters": {
        "width": 540.5966144525913,
        "height": 159.0426859412338,
        "content": "### Breaks the AI-generated outline into manageable sections. Each section will be individually processed to ensure clarity, structure, and relevance."
      }
    },
    {
      "id": "5d272c75-a2bc-4847-95bd-2ba13555d7c5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        300
      ],
      "parameters": {
        "width": 1360.0574487564681,
        "height": 295.93859634480214,
        "content": "### Refines each section using AI. Adds formatting, adjusts tone, and enhances readability. Ensures the content meets high-quality standards before merging into a full article."
      }
    },
    {
      "id": "1d8b9e13-1ba0-4298-aeef-9322e610128e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3655.31702494026,
        280
      ],
      "parameters": {
        "width": 723.7577183524706,
        "height": 299.4686919365027,
        "content": "### Aligns all sections in the correct order. Prepares the refined content for aggregation into a single, cohesive article"
      }
    },
    {
      "id": "9c6cdb3b-1be2-48d1-b6c1-0e5438816b5b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4500,
        260
      ],
      "parameters": {
        "width": 301.26809976103766,
        "height": 198.29256235064872,
        "content": "### Joins all ordered sections into a unified article. Ensures the flow and structure of the final content remain consistent and logical"
      }
    },
    {
      "id": "bfc18c66-7d7b-48b1-9d87-d159b53ca4ec",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4940,
        240
      ],
      "parameters": {
        "width": 320.41438093636225,
        "height": 213.60958729090797,
        "content": "### Converts the aggregated article into a downloadable text file. Uploads it to the Google Drive folder created earlier, ready for review and sharing."
      }
    },
    {
      "id": "e6378913-abed-41de-91d4-e30cc83fb3cf",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5340,
        200
      ],
      "parameters": {
        "width": 192.13429706168935,
        "height": 255.7314058766213,
        "content": "### Records the generated outline and article links in a Google Sheets document. This ensures easy access and tracking of the generated content for future use."
      }
    },
    {
      "id": "e6ebb536-2d4f-4c3a-88ab-6145aef59046",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5580,
        300
      ],
      "parameters": {
        "width": 570.2733502743432,
        "height": 280.62157140454303,
        "content": "## Next Steps: Automate Social Media Posting\n\n- ### Your content creation process is now complete! You can take automation to the next level by integrating this workflow with social media platforms su"
      }
    }
  ],
  "connections": {
    "Sort": {
      "main": [
        [
          {
            "node": "add_2_new_lines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "add_row": {
      "main": [
        [
          {
            "node": "topic_variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "final_article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "new_lines": {
      "main": [
        [
          {
            "node": "split_out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "split_out": {
      "main": [
        [
          {
            "node": "section_starts_with_#",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "input_brief": {
      "main": [
        [
          {
            "node": "new_lines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "section_text": {
      "main": [
        [
          {
            "node": "25_percent_chance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create_folder": {
      "main": [
        [
          {
            "node": "create_outline",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "final_article": {
      "main": [
        [
          {
            "node": "final_article_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "receive_topic": {
      "main": [
        [
          {
            "node": "add_row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create_outline": {
      "main": [
        [
          {
            "node": "markdown_to_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "input_sections": {
      "main": [
        [
          {
            "node": "section_paragraphs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "add_2_new_lines": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "topic_variables": {
      "main": [
        [
          {
            "node": "create_folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "markdown_to_file": {
      "main": [
        [
          {
            "node": "upload_outline_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_introduction": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "25_percent_chance": {
      "main": [
        [
          {
            "node": "change_section_format",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "final_article_file": {
      "main": [
        [
          {
            "node": "upload_fiinalArticle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "section_paragraphs": {
      "main": [
        [
          {
            "node": "section_text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_section_content": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload_outline_file": {
      "main": [
        [
          {
            "node": "input_brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload_fiinalArticle": {
      "main": [
        [
          {
            "node": "update_article_link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "change_section_format": {
      "main": [
        [
          {
            "node": "set_section_content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "section_starts_with_#": {
      "main": [
        [
          {
            "node": "set_introduction",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "input_sections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}