{
  "name": "Arxiv paper trend search using AI, write article, send email",
  "nodes": [
    {
      "id": "74a7f47c-6bdf-467d-adad-27148b00147b",
      "name": "If no category",
      "type": "n8n-nodes-base.if",
      "position": [
        660,
        340
      ]
    },
    {
      "id": "444e3a95-03a8-4c7d-be64-42f5c521311b",
      "name": "Set category",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1420,
        180
      ]
    },
    {
      "id": "ff6416b7-2532-4f23-9c94-8e2117dedc75",
      "name": "Extract paper information",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2220,
        1160
      ]
    },
    {
      "id": "aa3357eb-1cdc-4c28-96e5-7f2ae24c03c4",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1340,
        1160
      ]
    },
    {
      "id": "58aa5f38-d2a6-445b-ba88-439fcdcaa4d9",
      "name": "Sort",
      "type": "n8n-nodes-base.sort",
      "position": [
        1040,
        1160
      ]
    },
    {
      "id": "1062c42d-a594-456d-84ac-65222e934d4d",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        600,
        1160
      ]
    },
    {
      "id": "fce9869e-c42e-4ea3-a64d-be8611732e90",
      "name": "If no output?",
      "type": "n8n-nodes-base.if",
      "position": [
        1300,
        780
      ]
    },
    {
      "id": "734c06fc-dbe3-4756-a8c9-ec3f067555dd",
      "name": "has keyword?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        800
      ]
    },
    {
      "id": "d8ddb048-3907-4ec3-b0d3-2b9b86f16a68",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -240,
        340
      ]
    },
    {
      "id": "a74f872f-8422-428a-9315-29cac67d23f0",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        2900,
        1180
      ]
    },
    {
      "id": "96dd5de5-8a2c-4e77-845f-5e4b473ea70b",
      "name": "Check user's subscription info",
      "type": "n8n-nodes-base.supabase",
      "position": [
        60,
        340
      ]
    },
    {
      "id": "e8267bde-4d26-42f2-8a83-4adc8531ee1a",
      "name": "Get user's subscription info",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1780,
        340
      ]
    },
    {
      "id": "afdad194-e146-4a1e-a711-a27614197b9b",
      "name": "Loop Over users",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -200,
        760
      ]
    },
    {
      "id": "630e6f15-e3ef-479b-85e6-b48e8c22fd6e",
      "name": "Write newsletter by AI",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2680,
        1160
      ]
    },
    {
      "id": "d1def8c0-6616-4a69-8fca-62bbb8f15fe6",
      "name": "Get arxiv papers this week and scoring by AI",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1060,
        780
      ]
    },
    {
      "id": "7c65326f-5c19-41ed-bd76-de47c03f35a9",
      "name": "Set input for Extract paper information",
      "type": "n8n-nodes-base.set",
      "position": [
        1660,
        1160
      ]
    },
    {
      "id": "2dba4915-4e53-4f48-bf48-8aa5bec7329c",
      "name": "Set input for Write newsletter by AI",
      "type": "n8n-nodes-base.set",
      "position": [
        2440,
        1160
      ]
    },
    {
      "id": "b4c59331-e800-4d14-b9de-aab773e54524",
      "name": "Set input for Filter by keyword by RAG",
      "type": "n8n-nodes-base.set",
      "position": [
        1820,
        780
      ]
    },
    {
      "id": "5877ff9f-e2a3-42a4-9d2e-7bd19400de45",
      "name": "Send newsletter",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3100,
        1180
      ]
    },
    {
      "id": "4177470b-6b21-4a3b-94a7-a545db4d1dbf",
      "name": "Set input for Get category by AI",
      "type": "n8n-nodes-base.set",
      "position": [
        940,
        180
      ]
    },
    {
      "id": "7479c3dd-06bf-4f47-81c3-220b986a0aaa",
      "name": "Set input for Get arxiv papers this week and scoring by AI",
      "type": "n8n-nodes-base.set",
      "position": [
        520,
        780
      ]
    },
    {
      "id": "34cf99dd-789b-46cb-9ab3-c164249a938e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        20
      ],
      "parameters": {
        "width": 358.800943632496,
        "height": 562.0223932523666,
        "content": "### Get user subscription info from database\ntable schema should include\n- user_email: text\n- arxiv_cat: text[] <- array\n  -> you can check category https://arxiv.org/category_taxonomy\n- keyword: text"
      }
    },
    {
      "id": "61eb8e5b-9980-4c15-81df-5db9676bfe32",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "### Get category by AI\n- This workflow generate arxiv categories which represents given keyword"
      }
    },
    {
      "id": "c4a0c78c-c3e2-429d-b3a4-2adbab735fe6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        240
      ],
      "parameters": {
        "width": 322.9386766285814,
        "height": null,
        "content": "### Get subscription info again\n- This node is valuable if there is empty category so that it is generated by AI"
      }
    },
    {
      "id": "98d77cf7-2ae5-4b7b-9bd5-887b5cdb6688",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        560
      ],
      "parameters": {
        "width": 429.57411800818596,
        "height": 385.11926513472076,
        "content": "### Get arxiv papers this week and scoring by AI\n- This node retrieve arxiv papers by category in this week\n- 3 Filters are applied\n  - Filter if arxiv comment exists or if arxiv journal reference exi"
      }
    },
    {
      "id": "e74e6a2f-f756-48af-8a67-9b3b9a1672ad",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        600
      ],
      "parameters": {
        "width": 373.2943017245058,
        "height": 234.05238984694762,
        "content": "### Filter by keyword by RAG\n- This node has 3 task\n  - Embedding papers into vector stor\n  - Query vector store by given keyword\n  - And average its score by grouping by its id, then we can get which"
      }
    },
    {
      "id": "e5d8c2ff-2977-4549-97c9-c17bd07f683a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        1040
      ],
      "parameters": {
        "width": 288.87457729898546,
        "height": null,
        "content": "### Extract paper information\n- This node extract information from given paper. Actually this is summarization task\n- Plus, generate opinion by AI"
      }
    },
    {
      "id": "5d4ac01f-0112-4b3e-b462-00e0d93a389c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        1040
      ],
      "parameters": {
        "width": 331.8249634102151,
        "height": null,
        "content": "### Write newsletter by AI\n- This node has 2 tasks\n  - Translate information into given lang\n  - Refine content looks like \"newsletter\" and applying HTML format"
      }
    },
    {
      "id": "550ff766-443e-4da4-b18e-2f206d5ded94",
      "name": "Get arxiv category by AI for given keyword",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1200,
        180
      ]
    },
    {
      "id": "d623c7e0-c2df-4258-a317-207996fc1764",
      "name": "This is used to call following node once",
      "type": "n8n-nodes-base.merge",
      "position": [
        1580,
        340
      ]
    },
    {
      "id": "de837381-6113-4486-b733-9fd70d156a1c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        40
      ],
      "parameters": {
        "width": 508.83720930232573,
        "height": 800.6441210013597,
        "content": "## Arxive paper trend newsletter\n### Setup\n- Supabase\n  - Table schema\n    - user_email: Text - Mandatory\n    - arxiv_cat: [Text]\n    - interested_papers: [Text]\n    - keyword: [Text]\n  - Example\n{\n  "
      }
    },
    {
      "id": "8642a9a6-2123-42d8-af39-4278bf44c1fd",
      "name": "Filter by keyword within given documents",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2280,
        780
      ]
    },
    {
      "id": "2d3bf286-5c05-4a23-aa37-fec896203a22",
      "name": "Filter1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -520,
        760
      ]
    },
    {
      "id": "539daef2-149d-4dda-a05b-2c8c96780b25",
      "name": "Limit1",
      "type": "n8n-nodes-base.limit",
      "position": [
        2040,
        780
      ]
    }
  ],
  "connections": {
    "Sort": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Set input for Extract paper information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit1": {
      "main": [
        [
          {
            "node": "Filter by keyword within given documents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Send newsletter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Loop Over users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set category": {
      "main": [
        [
          {
            "node": "This is used to call following node once",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "has keyword?": {
      "main": [
        [
          {
            "node": "Set input for Filter by keyword by RAG",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If no output?": {
      "main": [
        [
          {
            "node": "Loop Over users",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "has keyword?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If no category": {
      "main": [
        [
          {
            "node": "Set input for Get category by AI",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "This is used to call following node once",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over users": {
      "main": [
        null,
        [
          {
            "node": "Set input for Get arxiv papers this week and scoring by AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send newsletter": {
      "main": [
        [
          {
            "node": "Loop Over users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Check user's subscription info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write newsletter by AI": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract paper information": {
      "main": [
        [
          {
            "node": "Set input for Write newsletter by AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get user's subscription info": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check user's subscription info": {
      "main": [
        [
          {
            "node": "If no category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set input for Get category by AI": {
      "main": [
        [
          {
            "node": "Get arxiv category by AI for given keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set input for Write newsletter by AI": {
      "main": [
        [
          {
            "node": "Write newsletter by AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set input for Filter by keyword by RAG": {
      "main": [
        [
          {
            "node": "Limit1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set input for Extract paper information": {
      "main": [
        [
          {
            "node": "Extract paper information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by keyword within given documents": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "This is used to call following node once": {
      "main": [
        [
          {
            "node": "Get user's subscription info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get arxiv category by AI for given keyword": {
      "main": [
        [
          {
            "node": "Set category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get arxiv papers this week and scoring by AI": {
      "main": [
        [
          {
            "node": "If no output?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set input for Get arxiv papers this week and scoring by AI": {
      "main": [
        [
          {
            "node": "Get arxiv papers this week and scoring by AI",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}