{
  "name": "Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets",
  "nodes": [
    {
      "id": "f68ac8bd-6f7e-42e6-bd43-7db019d5a881",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -880,
        -1296
      ]
    },
    {
      "id": "534fe3e2-dfc0-48d8-a5c9-3f3164cb7270",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -1632
      ],
      "parameters": {
        "width": 2320,
        "height": 880,
        "content": "# Data Engineering Team\n- Lead Generation\n- populate database\n"
      }
    },
    {
      "id": "a44e9983-a4e2-4806-af49-5098f6cb4586",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -1104
      ],
      "parameters": {
        "width": 432,
        "height": 320,
        "content": "# Notes:\n1. I used afew sources in case you want to do a PLUG-N-PLAY\n2. Do not use HTTP UNLESS NECESSARY cos Want to be fully Agentic and not Automation\n\n(Final Notes:#underline and bold) I designed a"
      }
    },
    {
      "id": "a0b46f18-37aa-45f7-bf7f-3ecf17bcc9f7",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -288,
        -544
      ]
    },
    {
      "id": "698eb711-ac8a-47de-9ebf-426af56f3e75",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -576,
        -352
      ]
    },
    {
      "id": "7035b218-985a-46a8-afab-58813c4cf54e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -768,
        -352
      ]
    },
    {
      "id": "82acc6db-4e4e-4f66-b34d-23b7f83e651f",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -672,
        -304
      ]
    },
    {
      "id": "18482439-cf53-453e-80c6-b096d8fc9d61",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -720
      ],
      "parameters": {
        "width": 928,
        "height": 528,
        "content": "## Data Analysis Team"
      }
    },
    {
      "id": "f960e445-fb12-443d-b045-53f06ee14fde",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -720,
        224
      ]
    },
    {
      "id": "5fdaa1f9-1f0e-4680-b9d1-750f306ef353",
      "name": "SalesAgentPrompt",
      "type": "n8n-nodes-base.code",
      "position": [
        -896,
        48
      ]
    },
    {
      "id": "51954a1c-427d-417a-9750-add0bcf5cd5b",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -288,
        48
      ]
    },
    {
      "id": "2ecbd566-c689-4251-a61f-e11f597e5ba7",
      "name": "Sales Team",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -720,
        48
      ]
    },
    {
      "id": "a3af00fb-6f45-4d78-81a4-3df35961b106",
      "name": "Mkt Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        -896,
        -544
      ]
    },
    {
      "id": "de7ad68f-7785-4a36-be4e-b7295e68a06a",
      "name": "Code Readability",
      "type": "n8n-nodes-base.code",
      "position": [
        -448,
        48
      ]
    },
    {
      "id": "0cd25f48-da30-42cf-9a8b-53fc12f6baf7",
      "name": "Google BQ",
      "type": "n8n-nodes-base.googleBigQuery",
      "position": [
        -544,
        -1392
      ]
    },
    {
      "id": "3c11dc10-5913-4602-8066-a1a36c8c3312",
      "name": "Msft Azure Blob",
      "type": "n8n-nodes-base.azureStorage",
      "position": [
        -544,
        -1248
      ]
    },
    {
      "id": "1c5392aa-5d50-41ad-b61f-0476b05cd6a3",
      "name": "Amzn AWS S3",
      "type": "n8n-nodes-base.awsS3",
      "position": [
        -544,
        -1120
      ]
    },
    {
      "id": "a2bc62d0-54e0-4a63-b584-9d1ce6e2b361",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -544,
        -1568
      ]
    },
    {
      "id": "f83de8e8-2fcd-4a44-be45-0a49dc7debe9",
      "name": "Goog Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -544,
        -976
      ]
    },
    {
      "id": "4dd5de32-204f-48a4-a73c-3c1fda45044b",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -128,
        -1184
      ]
    },
    {
      "id": "72bb6d85-d307-4801-9321-0259afca817b",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -320,
        -1184
      ]
    },
    {
      "id": "936d7706-798a-4dac-aea5-5b1a5bcdf553",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        112,
        -1200
      ]
    },
    {
      "id": "8a6791be-9eef-488b-8dab-b61e184d8d2e",
      "name": "AI Agent Determines Which Email to Email1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        688,
        -1184
      ]
    },
    {
      "id": "c7334e91-ca3c-4eeb-a578-39b230ae12ac",
      "name": "Data Collection Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        -1184
      ]
    },
    {
      "id": "9cd2a4c4-209a-4ebe-9ea4-934e6cb41816",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        688,
        -992
      ]
    },
    {
      "id": "8f41d04b-b053-4813-9ee6-8e0ab2498934",
      "name": "Check",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        320,
        -1312
      ]
    },
    {
      "id": "49a1e2cc-232d-4770-99a7-2f0eec97a046",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        832,
        -992
      ]
    },
    {
      "id": "e4d613cd-9ef6-4d6c-a6ba-df72382355e9",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -1376
      ],
      "parameters": {
        "width": 224,
        "height": 176,
        "content": "## Agent Task\n- Find Compatible Literary agents that represents\n 1. **non-fiction**\n 2. **Genre:** Memoir, Spiritual, Self-help, Psychology, Relationships, Family."
      }
    },
    {
      "id": "62b41325-2741-4a3c-9215-0b37ac4e0726",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -640
      ],
      "parameters": {
        "width": 230,
        "height": 80,
        "content": "### AI Agent Determines Which Email to Email"
      }
    },
    {
      "id": "fc477fda-60f6-4dc5-9309-63921da0c421",
      "name": "Research Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        64,
        -544
      ]
    },
    {
      "id": "f86dee69-0755-44b6-980c-27cd690c3fbd",
      "name": "Research Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        -112,
        -544
      ]
    },
    {
      "id": "6b8d5017-1d60-4673-a093-26a63ce2da0c",
      "name": "Eligibility Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -752,
        -544
      ]
    },
    {
      "id": "263e2540-297c-4172-96d6-89a213b05450",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        64,
        -352
      ]
    },
    {
      "id": "8e5ec8c3-4258-48bd-bed8-4f59bfc635e6",
      "name": "Structured Output Parser3",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        224,
        -336
      ]
    },
    {
      "id": "fa947b95-9010-4b03-a105-89bf5b605fdc",
      "name": "Data Collection Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        -1184
      ]
    },
    {
      "id": "47d3d9da-2dfc-4591-a0f4-c73a73b70192",
      "name": "Check2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1184,
        -1296
      ]
    },
    {
      "id": "26d955d7-b2b1-4dd3-b2ab-1d2465d069ae",
      "name": "Mkt Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        -544
      ]
    },
    {
      "id": "89fa19ba-7165-4b96-8363-bc36d2590906",
      "name": "Research Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -544
      ]
    },
    {
      "id": "3f446c8f-3e1e-4816-be11-01a0ff4e6234",
      "name": "check3",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        496,
        -672
      ]
    },
    {
      "id": "4f2be1a8-b2b5-4160-9eb4-f114c93bd0be",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        720,
        -496
      ]
    },
    {
      "id": "66ca849c-ddff-4053-bc4f-f2e044bbfdb4",
      "name": "QuickChart1",
      "type": "n8n-nodes-base.quickChart",
      "position": [
        1504,
        -496
      ]
    },
    {
      "id": "d06a8a18-fc9d-49f4-9d46-5831264bf952",
      "name": "Analysis Normalizer",
      "type": "n8n-nodes-base.code",
      "position": [
        1344,
        -496
      ]
    },
    {
      "id": "29cddd7f-a206-4a7f-8032-f66c11e96a13",
      "name": "Analysis Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        -496
      ]
    },
    {
      "id": "653822e2-ed38-4548-a64b-920789325802",
      "name": "Google Analytics 4",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        720,
        -672
      ]
    },
    {
      "id": "05ca28b8-149a-45a9-b804-d7a277179e83",
      "name": "PowerBi Dashboard",
      "type": "n8n-nodes-powerbi.powerBi",
      "position": [
        880,
        -672
      ]
    },
    {
      "id": "33985c5d-d9b3-43fd-b338-74ac07aa3134",
      "name": "Update Submission Time",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -64,
        48
      ]
    },
    {
      "id": "bb9e1177-6c1e-4649-a06f-981a50e46e81",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -1632
      ],
      "parameters": {
        "width": 432,
        "height": 504,
        "content": "## Main Objective\n\n### Marketing\n1. Audience discovery (agent discovery)\n2. Market segmentation (genre filtering)\n3. Channel qualification (email vs platform)\n4. Message personalization (agent-specifi"
      }
    },
    {
      "id": "6f78baf8-64ac-4a2c-a769-8bed2b27eef8",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        -720
      ],
      "parameters": {
        "width": 1584,
        "height": 528,
        "content": "# Marketing & Research Team"
      }
    },
    {
      "id": "7e3d1d40-8ed0-4356-b11d-bd9fc41dc0e5",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        -176
      ],
      "parameters": {
        "width": 1072,
        "height": 384,
        "content": "# Sales Team"
      }
    },
    {
      "id": "e01e0c71-39bb-4c09-837b-5d506efb09b8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -688
      ],
      "parameters": {
        "width": 224,
        "height": 128,
        "content": "## Agent Task\n### For Each Literary, Research on them to write tailored email"
      }
    },
    {
      "id": "ba0e9918-69c4-4af7-88cf-c0d2493fc434",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -688
      ],
      "parameters": {
        "width": 224,
        "height": 176,
        "content": "## Agent Task\n### Write in chat, send to Prompt and AI Generates Quick Chart. Alternaively, you can use BI or Google Analytics too"
      }
    },
    {
      "id": "3e6f764e-8dd6-4395-954a-5d3e3cd35f1f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -96
      ],
      "parameters": {
        "width": 224,
        "height": 128,
        "content": "## Agent Task\nAI Writes Message personalized emails to improve sales % Hit-rate\n"
      }
    },
    {
      "id": "1aa70620-3172-486d-9d39-ef941b771fbd",
      "name": "Eligibility Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1056,
        -496
      ]
    },
    {
      "id": "f5bf9e98-2064-4d53-97fa-b6e7d1717e08",
      "name": "OpenAI Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1056,
        -304
      ]
    }
  ],
  "connections": {
    "Check": {
      "main": [
        []
      ]
    },
    "Check2": {
      "main": [
        []
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Check",
            "type": "main",
            "index": 0
          },
          {
            "node": "Data Collection Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Research Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google BQ": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mkt Prompt": {
      "main": [
        [
          {
            "node": "Eligibility Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sales Team": {
      "main": [
        [
          {
            "node": "Code Readability",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Amzn AWS S3": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Goog Sheets": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        []
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Eligibility Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Mkt Normalizer": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Agent": {
      "main": [
        [
          {
            "node": "Research Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Update Submission Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analysis Prompt": {
      "main": [
        [
          {
            "node": "Eligibility Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Msft Azure Blob": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Prompt": {
      "main": [
        [
          {
            "node": "Research Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code Readability": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SalesAgentPrompt": {
      "main": [
        [
          {
            "node": "Sales Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google BQ",
            "type": "main",
            "index": 0
          },
          {
            "node": "Msft Azure Blob",
            "type": "main",
            "index": 0
          },
          {
            "node": "Amzn AWS S3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Goog Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Eligibility Agent": {
      "main": [
        [
          {
            "node": "Mkt Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Eligibility Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Eligibility Agent1": {
      "main": [
        [
          {
            "node": "Analysis Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Analytics 4": {
      "main": [
        [
          {
            "node": "PowerBi Dashboard",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Sales Team",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Determines Which Email to Email1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Research Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Eligibility Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analysis Normalizer": {
      "main": [
        [
          {
            "node": "QuickChart1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Normalizer": {
      "main": [
        [
          {
            "node": "SalesAgentPrompt",
            "type": "main",
            "index": 0
          },
          {
            "node": "check3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Collection Prompt": {
      "main": [
        [
          {
            "node": "AI Agent Determines Which Email to Email1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Eligibility Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent Determines Which Email to Email1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser3": {
      "ai_outputParser": [
        [
          {
            "node": "Research Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Data Collection Normalizer": {
      "main": [
        [
          {
            "node": "Check2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mkt Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Analysis Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Determines Which Email to Email1": {
      "main": [
        [
          {
            "node": "Data Collection Normalizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}