{
  "name": "Generate complete stories with GPT-4o and save them in Google Drive",
  "nodes": [
    {
      "id": "c92b4ff9-aee9-43af-9771-a65f82d36b39",
      "name": "$INPUTS$",
      "type": "n8n-nodes-base.set",
      "position": [
        1020,
        -360
      ]
    },
    {
      "id": "32d9f0e9-144d-4e19-a91d-9a72da1fce3d",
      "name": "Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        1260,
        -180
      ]
    },
    {
      "id": "cafd5be9-880f-405e-8ffe-4b8c34f937f3",
      "name": "Connect",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        -340
      ]
    },
    {
      "id": "2ce2d8eb-290e-408b-ba6c-4a1958434e1f",
      "name": "Convince",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        -340
      ]
    },
    {
      "id": "9f448ab7-9015-450e-96ff-a3b91ba710c8",
      "name": "Explain",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        -180
      ]
    },
    {
      "id": "07d62485-32e9-4bed-9e1a-7655f3c958e9",
      "name": "Impress",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        -180
      ]
    },
    {
      "id": "becf7b85-24fb-4356-8cb0-36ccd57032c1",
      "name": "Lead",
      "type": "n8n-nodes-base.set",
      "position": [
        1620,
        -20
      ]
    },
    {
      "id": "057d4b7e-6ada-4971-affb-c6c4758da99a",
      "name": "Motivate",
      "type": "n8n-nodes-base.set",
      "position": [
        1800,
        -20
      ]
    },
    {
      "id": "63a88fd9-19ac-4e6b-99c6-b92adbd03488",
      "name": "Sell",
      "type": "n8n-nodes-base.set",
      "position": [
        1980,
        -180
      ]
    },
    {
      "id": "45364868-d7ae-4f09-8dbf-c55d5b8b4c18",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        960,
        220
      ]
    },
    {
      "id": "64c41e54-d300-4f53-8ea6-fcb5ab8f5143",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        720,
        -360
      ]
    },
    {
      "id": "5be4862e-2157-49dd-9776-c8cda5652996",
      "name": "prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        -340
      ]
    },
    {
      "id": "7e3e5894-e76a-4e5f-839d-f32bf8eed774",
      "name": "pick cards",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        720,
        260
      ]
    },
    {
      "id": "08c279c5-c5b1-4f5e-8561-c7f97d56c1e7",
      "name": "story baseline",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2380,
        -340
      ]
    },
    {
      "id": "56bfd805-9ee5-4821-8ead-969f047dbaa4",
      "name": "story plot",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2340,
        260
      ]
    },
    {
      "id": "80d6fe40-52f8-4e7c-8f0f-7886ae05bcdf",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1100,
        260
      ]
    },
    {
      "id": "3f2ce91b-b4cc-499b-a844-c0d6b157e3cc",
      "name": "story enhancement",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1560,
        260
      ]
    },
    {
      "id": "eb46ce10-f348-466f-a744-4edc29d0a49f",
      "name": "characters",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2200,
        -40
      ]
    },
    {
      "id": "68885015-91d6-4654-add1-3e3e452113b4",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1340,
        260
      ]
    },
    {
      "id": "1783f82f-f6f1-48eb-818e-0cde36a67ea0",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2060,
        260
      ]
    },
    {
      "id": "1efe0358-36ec-4208-b4a3-2581a3bd82b8",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1180,
        860
      ]
    },
    {
      "id": "69735d14-bc24-4a91-9f8b-2fc9e3d09540",
      "name": "story timeline",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        720,
        560
      ]
    },
    {
      "id": "454f32c0-16c6-4187-873e-642d196d5f4f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6d0cf2bb-cf00-4404-8b3b-64b3e04a06fe",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "668eccc9-a6dc-4b7f-a949-edea1f405138",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        -440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "afa731f1-e4e3-4f8c-a2eb-2f075b227f48",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        -440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1a90ea2a-d84f-4f53-b2f5-577be1b0c2d2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        -140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0c533b8a-7b77-4882-af0a-3f0fc2b2cf1f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "690c9516-2fa5-4454-a3c1-42e235ec96f6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5f495274-d64c-4ce9-ad22-776c34e80c55",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2280,
        160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f14a6431-f6ec-4eef-873d-2a64f07f1811",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fc8cb6e2-c55c-4358-abcc-c5ee9dbde3e2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5d2abf13-f144-44ac-9704-4cbf77251f2e",
      "name": "json schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2540,
        -400
      ]
    },
    {
      "id": "b6de0d85-6488-46ed-a422-662bdbba8927",
      "name": "story draft",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1300,
        560
      ]
    },
    {
      "id": "d9b577d2-76a7-4d8e-ab5a-7ac0b14907ab",
      "name": "edit notes",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1800,
        560
      ]
    },
    {
      "id": "3ef023fa-b434-4f4d-9f5a-8fa73fb2e13a",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a4ad6eea-cffe-454c-8d5d-ca9083fe7f4a",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2120,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "aa9cb55e-f07a-4d88-a605-4dcfaf10d4ea",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5ef977f9-86c0-4ab0-aba3-f7e37728f5e1",
      "name": "character json",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2400,
        -80
      ]
    },
    {
      "id": "38f5dffc-d2bb-4c9b-b257-2af6fc8b7d30",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -180
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bde362d9-18c7-4e35-bda4-5487a01d2a07",
      "name": "story rules",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        720,
        -60
      ]
    },
    {
      "id": "12b70183-36dc-4834-88b9-43560449ace8",
      "name": "rules json",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        940,
        -100
      ]
    },
    {
      "id": "e77b44ef-f80c-47d8-b416-0f652f67a70e",
      "name": "gpt-4o1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        2080,
        860
      ]
    },
    {
      "id": "2f98a06a-54ba-41af-8104-89dfc2b188b7",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2540,
        200
      ]
    },
    {
      "id": "237eb833-f2e1-4d4f-90b1-4499f5560dbc",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2480,
        520
      ]
    },
    {
      "id": "439ea9b6-14f8-452b-a090-f1dd94c2f69f",
      "name": "Structured Output Parser3",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1500,
        500
      ]
    },
    {
      "id": "713d1051-1841-4218-9d7e-a8a7405a885e",
      "name": "story enhancements json",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1820,
        180
      ]
    },
    {
      "id": "a417089c-3b0f-4bb5-bd83-5a7773c2675a",
      "name": "edit notes json",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1980,
        500
      ]
    },
    {
      "id": "50b841a3-8386-4c29-a384-a9afd784e690",
      "name": "story_final",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2260,
        560
      ]
    },
    {
      "id": "298d49f8-9381-43e3-8aef-18929b2d4442",
      "name": "create_story_file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        720,
        860
      ]
    },
    {
      "id": "1a4ed288-761f-47e9-ba9e-4a0a1c2c05c5",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b77cccd2-987d-4626-8731-5ce985ff4a59",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2c7ee24e-e5ef-48cd-981a-379a84a9b751",
      "name": "timeline json",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        940,
        500
      ]
    },
    {
      "id": "0e05e8b7-4cdb-4c41-883f-c8b12bb47f37",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2380,
        -820
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "25265f0f-9c8c-4717-ad43-428f3c758311",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2220,
        760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f2c434e3-ca7a-4c68-99b8-65f3c05008f0",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -820
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a1f06eb0-7b8d-4610-87bc-f07f0506912b",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        -820
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Lead": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sell": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prompt": {
      "main": [
        [
          {
            "node": "story baseline",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Connect": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Explain": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Impress": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gpt-4o1": {
      "ai_languageModel": [
        [
          {
            "node": "story rules",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story plot",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "pick cards",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story enhancement",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story baseline",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story timeline",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "edit notes",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "characters",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story draft",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "story_final",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "$INPUTS$": {
      "main": [
        [
          {
            "node": "story rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convince": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Motivate": {
      "main": [
        [
          {
            "node": "prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "story plot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "characters": {
      "main": [
        [
          {
            "node": "pick cards",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "edit notes": {
      "main": [
        [
          {
            "node": "story_final",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "pick cards": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "rules json": {
      "ai_outputParser": [
        [
          {
            "node": "story rules",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "story plot": {
      "main": [
        [
          {
            "node": "story timeline",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "json schema": {
      "ai_outputParser": [
        [
          {
            "node": "story baseline",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "story draft": {
      "main": [
        [
          {
            "node": "edit notes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "story rules": {
      "main": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "story_final": {
      "main": [
        [
          {
            "node": "create_story_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "timeline json": {
      "ai_outputParser": [
        [
          {
            "node": "story timeline",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "character json": {
      "ai_outputParser": [
        [
          {
            "node": "characters",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "story baseline": {
      "main": [
        [
          {
            "node": "characters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "story timeline": {
      "main": [
        [
          {
            "node": "story draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "story enhancement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "edit notes json": {
      "ai_outputParser": [
        [
          {
            "node": "edit notes",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "create_story_file": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "story enhancement": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Connect",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convince",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Explain",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Impress",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Motivate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sell",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "story enhancements json": {
      "ai_outputParser": [
        [
          {
            "node": "story enhancement",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "pick cards",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "story plot",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "story_final",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser3": {
      "ai_outputParser": [
        [
          {
            "node": "story draft",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "$INPUTS$",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}