{
  "name": "Build a weekly AI trend alerter with arXiv and Weaviate",
  "nodes": [
    {
      "id": "d36fdcbc-4add-46b5-a440-af07d1b81d56",
      "name": "Weaviate Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreWeaviate",
      "position": [
        3440,
        752
      ]
    },
    {
      "id": "04f15082-cb14-46b2-8e92-e2926e7de128",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        3440,
        1072
      ]
    },
    {
      "id": "ff6e5918-4b72-4902-828b-aa6e39fdd378",
      "name": "Query arXiv",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        752
      ]
    },
    {
      "id": "33c6d11a-6b27-4297-8fe5-08260f474871",
      "name": "Convert XML to JSON",
      "type": "n8n-nodes-base.xml",
      "position": [
        832,
        752
      ]
    },
    {
      "id": "fe135a0c-1976-444f-bd65-9d26d6e969ef",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        1424,
        752
      ]
    },
    {
      "id": "1082f1b2-94de-4ea5-83a6-83242d065233",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        976,
        2368
      ]
    },
    {
      "id": "780950ec-78b6-4c84-814c-03c3c6881b2c",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        3328,
        1072
      ]
    },
    {
      "id": "119e0896-430f-4019-8fe6-8677cd0e9289",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        816,
        2368
      ]
    },
    {
      "id": "0270ad87-f27a-491a-bb95-7983cb1b4d80",
      "name": "Weaviate Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreWeaviate",
      "position": [
        80,
        2288
      ]
    },
    {
      "id": "780c692e-3444-4293-aeee-70241d151011",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        64,
        2432
      ]
    },
    {
      "id": "798c5bdc-f46a-45d2-8692-8875efd9cb6e",
      "name": "Date & Time",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        240,
        752
      ]
    },
    {
      "id": "56d6ff4b-3ae0-4450-b899-9773e83ce896",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1088,
        1584
      ]
    },
    {
      "id": "d62c633e-d6d2-4d0e-9645-a909ae4a0efa",
      "name": "Recursive Character Text Splitter1",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        3552,
        1184
      ]
    },
    {
      "id": "c2040ff2-808d-4f6e-8682-06f2aad3cf8b",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1136,
        2368
      ]
    },
    {
      "id": "5d07a9fd-ff2a-4536-aa13-171e4eeeac42",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -128,
        752
      ]
    },
    {
      "id": "913e8a25-32af-4c2c-943c-58ab2563accd",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        560
      ],
      "parameters": {
        "width": 380,
        "height": 340,
        "content": "## 1. Specify date range for weekly automation\n1. Calculate today's date\n2. Calculate dates for the last week based on today"
      }
    },
    {
      "id": "704752b7-75cf-40d8-9b31-fc8e43ab18b2",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        560
      ],
      "parameters": {
        "width": 360,
        "height": 452,
        "content": "## 2. Fetch weekly articles from arXiv.\nFetch ML article abstracts by querying the free arXiv API.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe number of maximum papers returned is set by default to 200. You can change thi"
      }
    },
    {
      "id": "9529c98c-a28c-4512-a076-9e304d82125a",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        560
      ],
      "parameters": {
        "width": 820,
        "height": 420,
        "content": "## 3. Pre-process data\n1. Convert XML response to JSON.\n2. Split results by article ID.\n3. Format data for Weaviate.\n4. Remove any duplicates, if they exist.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSpecifically, we are mer"
      }
    },
    {
      "id": "57c8762e-5afd-4a9c-b3d0-61fbd863bc36",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3104,
        560
      ],
      "parameters": {
        "width": 840,
        "height": 380,
        "content": "## 6. Create a new Weaviate collection in existing cloud cluster\n1. Connect to your Weaviate Cloud or local credentials.\n2. Set `Operation Mode` to `Insert Documents`.\n3. To insert new data into a **n"
      }
    },
    {
      "id": "b0e70958-64a7-4b5f-ae7e-e6350757eb49",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3264,
        960
      ],
      "parameters": {
        "width": 560,
        "height": 580,
        "content": "## 7. Configure components for embeddings\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__Embeddings Node__\n1. Select your embedding provider and model connect it to your credentials.\n  \n__Data Loader__\n2. The `Type of Data` "
      }
    },
    {
      "id": "3b505c27-caa0-4f25-8121-90d39b9a63b3",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3968,
        560
      ],
      "parameters": {
        "width": 700,
        "height": 340,
        "content": "## 8. Confirm that articles have been uploaded.\nThese steps serve as verification that the new weekly articles have been successfully uploaded into Weaviate before proceeding to run the AI Agent node."
      }
    },
    {
      "id": "64098a08-06fd-4981-9d46-6efe61e01f81",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        1392
      ],
      "parameters": {
        "width": 660,
        "height": 500,
        "content": "## 1. Configure the AI Agent node with Weaviate as a _TOOL_\n1. Set  `Source for Prompt (User Message)` to `Define below`.\n2. In `Prompt (User Message)`, give a short explanation of the retrieval and a"
      }
    },
    {
      "id": "24a428b0-8ee2-4e0d-9c36-c0934bcc13d3",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        1920
      ],
      "parameters": {
        "width": 500,
        "height": 640,
        "content": "## 3. Configure Weaviate Vector Store\n1. Select the same credentials (cloud or local) to connect with as earlier.\n2. Set `Operation Mode` to `Retrieve Documents as Tool for AI Agent`.\n3. Add a `Descri"
      }
    },
    {
      "id": "3af4b9b8-5929-4bff-af3f-7a200d29ea34",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        1920
      ],
      "parameters": {
        "width": 744,
        "height": 640,
        "content": "## 4. Add model, memory, and output parser\n1. We're using the OpenRouter Chat Model node so that we can use Google Gemini for the agent.\n2. Add simple (short-term) memory to the agent, setting `Sessio"
      }
    },
    {
      "id": "bc738a22-4e2d-4710-88ee-1186bb29b759",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        1392
      ],
      "parameters": {
        "width": 600,
        "height": 400,
        "content": "## 2. Post-process agent response\n1. Use the `Edit Fields` node to add an expression that replaces \"\\n\\n\" in the agent's response with actual page breaks (so that it can be properly parsed as markdown"
      }
    },
    {
      "id": "afc29ee4-c944-4c49-abef-6356a84975f9",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        1392
      ],
      "parameters": {
        "width": 520,
        "height": 400,
        "content": "## 5. Send the output as an email!\n1. Select your `STMP Account` credential.\n2. Set the `Subject` equal to the subject key `{{ $json.output.subject }}`.\n3. Set `Email Format` to `HTML`.\n4. Set `HTML` "
      }
    },
    {
      "id": "fc89c7eb-a1b2-4692-aed4-b075cbb6793b",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        400
      ],
      "parameters": {
        "width": 1600,
        "height": 140,
        "content": "# Part 1: Fetch, clean, enrich and insert arXiv abstracts into Weaviate\nIn the first part of this workflow, we activate a `Schedule Trigger` to fetch AI and ML abstracts (along with their metadata lik"
      }
    },
    {
      "id": "1f244dc1-f564-4a01-b582-49484c3e7d63",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        1232
      ],
      "parameters": {
        "width": 1580,
        "height": 140,
        "content": "# Part 2: Use agentic RAG to identify research trends and send them in an email\nIn this part of the workflow, we configure an AI Agent node to work with Weaviate as a tool. The entire embedded collect"
      }
    },
    {
      "id": "75d64ce1-57c6-4b0f-80e4-66dbe8488397",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1952,
        1088
      ]
    },
    {
      "id": "901c7f80-f856-4d90-8046-8b6fe2e45056",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2224,
        1088
      ]
    },
    {
      "id": "dbea7aee-5dae-457e-8b5c-343d18188fb0",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2704,
        752
      ]
    },
    {
      "id": "5df76f3f-0a71-4999-a85f-375c680fe073",
      "name": "OpenRouter Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        2288,
        1232
      ]
    },
    {
      "id": "0bfa6914-5450-494a-9c1b-cccd58ae4d4c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        560
      ],
      "parameters": {
        "width": 980,
        "height": 460,
        "content": "## 4. Enrich arXiv articles with topic classifications and potential impact predictions \n1. Set  `Source for Prompt (User Message)` to `Define below`.\n2. In `Prompt (User Message)`, give a short expla"
      }
    },
    {
      "id": "aab2d979-238c-450d-9d3f-0ff085f90730",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        1040
      ],
      "parameters": {
        "width": 592,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nChoose your models for the agent and structured output parser (we use `claude-3.7-sonnet`)."
      }
    },
    {
      "id": "dade3fcb-63c5-4c34-8287-9270a7758960",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        560
      ],
      "parameters": {
        "width": 460,
        "height": 340,
        "content": "## 5. Post-process enriched data\n1. Merge the output from AI agent with the existing article data.\n2. Get rid of the redundant `\"output\"` field in the JSON."
      }
    },
    {
      "id": "7e3b842d-aba8-41a8-95ec-94917017998d",
      "name": "Get Current Date",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        48,
        752
      ]
    },
    {
      "id": "1356f9bc-87eb-4f69-871c-0bdc1591e2c9",
      "name": "Split Results",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1024,
        752
      ]
    },
    {
      "id": "6f37e9bb-e5c0-493a-905d-87b55b874f49",
      "name": "Prep Data for Weaviate",
      "type": "n8n-nodes-base.set",
      "position": [
        1232,
        752
      ]
    },
    {
      "id": "69af1ed4-0a73-4179-aff2-d78253e7921a",
      "name": "Enrich Articles with Topic Classification",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1984,
        752
      ]
    },
    {
      "id": "36068ba8-4e86-403c-b6a6-7fe55af58a95",
      "name": "Remove Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2912,
        752
      ]
    },
    {
      "id": "af99113b-8804-47bf-a74d-2265f63b97e1",
      "name": "Aggregate Uploaded arXiv IDs",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4112,
        752
      ]
    },
    {
      "id": "92511b85-b11d-4fd7-9985-326051db472a",
      "name": "Add Static sessionId",
      "type": "n8n-nodes-base.set",
      "position": [
        4400,
        752
      ]
    },
    {
      "id": "f7e31525-1ac9-4adc-b4c6-9159e1b96e6e",
      "name": "Agentic RAG for Trend Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        48,
        1584
      ]
    },
    {
      "id": "bb101516-818c-48e5-87d8-1a9f98d0f3a2",
      "name": "Post Process Data",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        1584
      ]
    },
    {
      "id": "f5f96c9f-08ad-4707-a24e-d3c518218778",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1520,
        1584
      ]
    },
    {
      "id": "e61ea149-eae7-43bc-a308-f791ea408dec",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 1600,
        "height": 380,
        "content": "# Build a Weekly AI Trend Alerter with arXiv and Weaviate\n\n🧑🏽‍🔬 Ditch the endless scroll for AI trends. Meet Archi, your personal AI trend scout that hits you up once a week with everyone you need to "
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Remove Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time": {
      "main": [
        [
          {
            "node": "Query arXiv",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query arXiv": {
      "main": [
        [
          {
            "node": "Convert XML to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Fields": {
      "main": [
        [
          {
            "node": "Weaviate Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Agentic RAG for Trend Analysis",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Split Results": {
      "main": [
        [
          {
            "node": "Prep Data for Weaviate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Current Date": {
      "main": [
        [
          {
            "node": "Date & Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Current Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Weaviate Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Post Process Data": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Enrich Articles with Topic Classification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Weaviate Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Convert XML to JSON": {
      "main": [
        [
          {
            "node": "Split Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Weaviate Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Add Static sessionId": {
      "main": [
        [
          {
            "node": "Agentic RAG for Trend Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agentic RAG for Trend Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Weaviate Vector Store": {
      "main": [
        [
          {
            "node": "Aggregate Uploaded arXiv IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Enrich Articles with Topic Classification",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prep Data for Weaviate": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weaviate Vector Store1": {
      "ai_tool": [
        [
          {
            "node": "Agentic RAG for Trend Analysis",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Agentic RAG for Trend Analysis",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Enrich Articles with Topic Classification",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Uploaded arXiv IDs": {
      "main": [
        [
          {
            "node": "Add Static sessionId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agentic RAG for Trend Analysis": {
      "main": [
        [
          {
            "node": "Post Process Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter1": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Enrich Articles with Topic Classification": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}